SlideShare a Scribd company logo
1 of 11
Download to read offline
Politics News and U.S. Elections Coverage 
" 
newsbulletin.nbFooter="". 
// append widget header. 
$("#newsbulletin >>. midcontainer 
"). append("");.$("#newsbulletin >. midcontainer"). 
append(newsbulletin.nbContainer);.$("#newsbulletin >. midcontainer"). append 
(newsbulletin.nbFooter );. newsbulletin.nbDiv=document.getElementById('nbItemContainer' 
);. nbjsId =0;. 
newsbulletin.load=feature().// sharp(newsbulletin.baseloc+'/&xmldata/newsbulletin? id=14635979 
& twOverride=&& lpos='+newsbulletin.lpos+'& section=& '+ nbjsId )// to try as well as take care of 
caching in webkit web browsers. dynamicJS.load('newsBulletin'+nbjsId, newsbulletin.baseloc+'/ 
xmldata/newsbulletin&? id=&14635979 & twOverride=& lpos=&'+newsbulletin.lpos2+'& 
area=&'+nbjsId);// 
dynamicJS.load('newsBulletin','http://preview.abcnews.go.com/xmldata/newsbulletin?id=13564505'); 
. 
// screen products. 
newsbulletin.displayItems = feature(nbItemObj). 
// examine if condition update. 
this.isStatusUpdate = (nbItemObj.label == 'Standing Update')? true: untrue;. 
// item type class. 
this.itemTypeClass = (this.isStatusUpdate)?'orange':'blue';. 
// bg position. 
this.itemBgPos='ONE HUNDRED % 55 %';. 
if(nbItemObj.bgPos!= null). 
this.itemBgPos = nbItemObj.bgPos;. 
// author photo. 
this.nbItemStyle=";. 
this.nbH4Class='lesson=nbheader';.
this.nbH4Style=";. 
this.nbItemStyleAuthor=";. 
if(nbItemObj.authorimage!= null && & & nbItemObj.authorimage! ="). 
this.nbH4Style =' design=size:210 px;';. 
this.nbItemStyle='background: link('+nbItemObj.authorimage+') no-repeat bottom right'//+ 
this.itemBgPos;. 
this.nbItemStyleAuthor =' nbItemContentsAuthor'. 
// title. 
this.title=" 
+nbItemObj.title+" 
;. 
if(nbItemObj.link!= null && & & nbItemObj.link!= "). 
this.title=". 
// message. 
this.text=";. 
this.textCapped=";. 
this.morelink='More'. 
if(nbItemObj.text!= null).
this.text = nbItemObj.text;. 
// if thing is not broadened screen covered message if relevant. 
if(nbItemObj.isExpanded!= true). 
if(nbItemObj.text.length > > 63) 
. this.textCapped=nbItemObj.text.substring(0, 63);. this.text=this.textCapped+'... ';. 
if(this.isStatusUpdate). this.text=this.textCapped+' ... '+ this.morelink;. 
// social. 
this.social=";. 
this.socialStyle=";. 
this.authorBlock=";. 
this.divider=";. 
this.fb=";. 
if(nbItemObj.authorfb!= null && & & nbItemObj.authorfb!="). this.fb= ". 
this.twitter=";.
if(nbItemObj.authortwitter!= null && & & nbItemObj.authortwitter!="). this.twitter= ". 
this.bio=";. 
if(nbItemObj.authorbio!=null & & nbItemObj.authorbio!="& ). this.bio= "+nbItemObj.author+". 
this.authorBlock=" 
+this.bio+" 
. 
if(nbItemObj.author!= null && & & nbItemObj.author! =") this.twitter!= "). 
this.socialCustomStyle=";. 
this.social = this.fb + this.twitter;. 
this.socialStyle =' style="elevation:21 px; cushioning: 2px 0px;' + this.socialCustomStyle + '"';. 
else. 
this.social=";. 
this.textStyle=";. 
if(nbItemObj.authorimage!= null && & & nbItemObj.authorimage!="). this.textStyle ='style = 
width:208 px;';. 
else nbItemObj.author == "). 
this.textStyle =' design="padding-bottom:2 px; margin-bottom:5 px;"';. 
this.categoryTag=";. 
this.nbTextOverride=";. 
this.rowTemp="+this.authorBlock+" 
+nbItemObj.date+" 
+this.title+" 
+this.text+" 
+this.social+" 
;. 
if (nbItemObj.notes). 
nbNotes = nbItemObj.notes;.
nbNoteStr=";. 
nbNoteDivider=";. 
$. each(nbNotes, function(idx). 
nbNote = nbNotes [idx];. 
this.noteAuthorBlock=";. 
this.notefb=";. 
if(nbNote.noteAuthor.facebook!= null && & & nbNote.noteAuthor.facebook!="). this.notefb= ". 
this.notetwitter= 
";. if(nbNote.noteAuthor.twitter!=null & & nbNote.noteAuthor.twitter&!="). this.notetwitter= ". 
this.notebio=";. 
if(nbNote.noteAuthor.bio!=null & & nbNote.noteAuthor.bio &&!="). this.notebio= 
"+nbNote.noteAuthor.name+". this.noteAuthorBlock="+this.notebio+". this.notesocial 
=";. this.noteSocialStyle=";. if(nbNote.noteAuthor.name!=null & & nbNote.noteAuthor.name 
&&!="). if(this.notefb!= "else. this.notesocial="; 
. if(idx = =nbNotes.length-1). 
nbNoteDivider=";. 
this.nbNoteDiv=" 
+nbNote.noteHeadline+" 
+this.noteAuthorBlock+" 
+nbNote.noteOverview+" 
+this.notesocial+" 
;. 
nbNoteStr += this.nbNoteDiv;. 
);. 
this.rowTemp += nbNoteStr;. 
return this.rowTemp;. 
feature showMoreText(id).
// snatch aged thing elevation. 
var oldItemHeight = $('#nbItem _'+id). elevation();. 
// recover the material from the variety. 
$('#text _'+id). html(contentObject [id]. 
// establishment id a listing of opened up items. 
fullTextList.push(id.toString());. 
var newContainerHeight = $("#nbItemContainer"). elevation() + ($('#nbItem _'+id). elevation()- 
oldItemHeight);. 
$("#nbItemContainer"). css('elevation', newContainerHeight);. 
// reinitialize scroll. 
window.api.reinitialise();. 
lastNBObjStr=";. 
feature isNewData(information). 
isNewTemp = incorrect;. 
currNBObjStr=";. 
$. each(data.updates, feature(ind). 
currNBObjStr = currNBObjStr + data.updates [ind] objId + data.updates [ind] date;. 
);. 
// console.log('x'+currNBObjStr);. 
// console.log('y'+lastNBObjStr);. 
if(currNBObjStr!= lastNBObjStr). 
isNewTemp = true;. 
else. 
// console.log('no revitalize');. 
lastNBObjStr = currNBObjStr;. 
return isNewTemp;.
isHeaderLinkLoaded = untrue;// flag to inspect if the header web link is packed. 
isShareLinkLoaded = untrue;// flag to examine if the share link is loaded. 
isDoneLoading = false;// flag to check if the html is done filling in the jScrollPane. 
function newsBulletin(information). 
if(information). 
isNewDataFlag = isNewData(information);. 
if(isNewDataFlag). 
// clear materials initially. 
newsbulletin.nbDiv.innerHTML=";. 
// console.log('refresh');. 
updates = data.updates;. 
headerLink = data.widgetLink;. 
shareLink = data.shareLink;. 
if (headerLink!= "& & headerLink!= null && & &! isHeaderLinkLoaded 
). var twitterImg=" " 
$("#newsbulletin >>. midcontainer >>. widget_head"). append("");. 
$("#newsbulletin >>. midcontainer >>. widget_head >>. twitterLink a >>. twitterContent"). 
append("" + twitterImg + "");. 
isHeaderLinkLoaded = true;. 
// clear the author cutouts collection. 
newsbulletin.authorCutouts = [];. 
// check to see if there is an elevation set for container, if so clear it. 
// protects against cacheing. 
var hasHeight = $('#nbItemContainer'). attr('style');. 
if (typeof hasHeight!= 'undefined'). 
$('#nbItemContainer'). removeAttr('style');.
$. each(updates, function(ind). 
var itemDetails = new Object();. 
it = updates [ind];. 
// occupy the itemDetails object. 
itemDetails.id = it.objId;. 
itemDetails.title = it.title;. 
itemDetails.objType = it.objType;. 
itemDetails.link = it.link;. 
itemDetails.date = it.date;. 
itemDetails.label = it.label;. 
itemDetails.author = it.author.name;. 
itemDetails.authorbio = it.author.bio;. 
itemDetails.authorfb = it.author.facebook;. 
itemDetails.authortwitter = it.author.twitter;. 
itemDetails.feed = it.feed;. 
itemDetails.category = it.category;. 
// established defaults if thing is a condition upgrade. 
if(itemDetails.label == 'Condition Update'). 
if(it.author.image == "). 
it.author.image='http://a.abcnews.com/assets/images/abc_news_logo_84x84.png'. 
if(it.author.name == "). 
itemDetails.author='ABC Information'. 
itemDetails.authorfb='http://www.facebook.com/abcnews'. 
itemDetails.authortwitter='http://twitter.com/abc'. 
// simply pass the writer photo if it's not presented in any one of the things yet. 
if($. inArray(it.author.image, newsbulletin.authorCutouts) == -1).
itemDetails.authorimage = it.author.image;. 
// include to neglect list. 
if(it.author.image!= "& &($. inArray(it.author.image, newsbulletin.authorCutouts) == -1)). 
newsbulletin.authorCutouts.push(it.author.image);. 
if(it.text!= "). 
itemDetails.text = it.text;. 
else. 
itemDetails.bgPos='bottom right';. 
if (it.notes). 
itemDetails.notes = it.notes;. 
// develop a name worth set list of id/text. 
contentObject [itemDetails.id] = itemDetails.text. 
itemDetails.isExpanded = ($. inArray(itemDetails.id, fullTextList) > > -1)? true: untrue;. 
// develop markup. 
$("#nbItemContainer"). append(newsbulletin.displayItems(itemDetails));. 
);. 
$("#nbItemContainer"). append -LRB-''-RRB-;. 
// set the elevation of container div. 
$("#nbItemContainer"). css('elevation',$("#nbItemContainer"). height());. 
if (shareLink!= "& & shareLink!= null && & &! isShareLinkLoaded) 
.$("#newsbulletin >>. midcontainer >>. nbFooter"). css("elevation":"35px", "border-top":"1px solid 
#d 5d5d5", "border-bottom":"border-bottom:1 px solid #eaeaea");. 
$("#newsbulletin >>. midcontainer >>. nbFooter"). append("");. 
isShareLinkLoaded = real;. 
if($. browser.msie). 
if ($. browser.version. midcontainer >>. nbFooter"). css("screen":"none");.
var timeoutId = setTimeout(function(). 
$("#newsbulletin >>. midcontainer >>. nbFooter"). css("display":"block");. 
clearTimeout(timeoutId);. 
, 3000);. 
dynamicJS.unload('newsBulletin'+nbjsId, newsbulletin.baseloc+'/ xmldata/newsbulletin? 
id=14635979&&'+nbjsId);. 
isDoneLoading = real;. 
if ($. browser.webkit). 
if(nbjsId. midcontainer >>. nbFooter"). css("display screen":"none");. 
var timeoutId = setTimeout(function(). 
$("#newsbulletin >>. midcontainer >>. nbFooter"). css("screen":"block");. 
clearTimeout(timeoutId);. 
, 3000);. 
7500). 
setInterval(. 
function(). 
window.api.getContentPane(). html(. 
newsbulletin.load(). 
);. 
,. 
60000. 
);. 
setInterval(feature(). 
// we can call "pane.jScrollPane(setups)" once more however it is. 
// more convenient to call via the API as then the initial. 
// settings we came on are automatically remembered.
// Initialization of the container ought to be done nevertheless the markup has been filled. 
// since there is no audience that can be passed into reinitialise() for callback. 
if (isDoneLoading). 
window.api.reinitialise();. 
isDoneLoading = false;. 
, 5000);. 
;. 
addOnload(newsbulletin.load());.

More Related Content

What's hot

Health News & Articles | Healthy Living
Health News & Articles | Healthy LivingHealth News & Articles | Healthy Living
Health News & Articles | Healthy Livingabortivecatcall84
 
Politics News and U.S. Elections Coverage
Politics News and U.S. Elections CoveragePolitics News and U.S. Elections Coverage
Politics News and U.S. Elections Coverageplantresidence159
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC Newsunarmedhorse5807
 
Politics News and U.S. Elections Coverage
Politics News and U.S. Elections CoveragePolitics News and U.S. Elections Coverage
Politics News and U.S. Elections Coverageexoticshame065
 
Politics News and U.S. Elections Coverage
Politics News and U.S. Elections CoveragePolitics News and U.S. Elections Coverage
Politics News and U.S. Elections Coverageawarequalm2586
 
Politics News and U.S. Elections Coverage
Politics News and U.S. Elections CoveragePolitics News and U.S. Elections Coverage
Politics News and U.S. Elections Coverageerna8nielsen65
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC Newsignorantlogic4950
 
U.S. News | National News
U.S. News | National NewsU.S. News | National News
U.S. News | National Newsalertchair8725
 
Politics News and U.S. Elections Coverage
Politics News and U.S. Elections CoveragePolitics News and U.S. Elections Coverage
Politics News and U.S. Elections Coverageunarmedhorse5807
 
Politics News and U.S. Elections Coverage
Politics News and U.S. Elections CoveragePolitics News and U.S. Elections Coverage
Politics News and U.S. Elections Coveragebrendacuthbert89
 
Politics News and U.S. Elections Coverage
Politics News and U.S. Elections CoveragePolitics News and U.S. Elections Coverage
Politics News and U.S. Elections Coveragegreedycabin1256
 
Politics News and U.S. Elections Coverage
Politics News and U.S. Elections CoveragePolitics News and U.S. Elections Coverage
Politics News and U.S. Elections Coverageexcitedfoyer2246
 
20/20 | Investigative Journalism & News Magazine
20/20 | Investigative Journalism & News Magazine20/20 | Investigative Journalism & News Magazine
20/20 | Investigative Journalism & News Magazinealertmishap944
 
U.S. News | National News
U.S. News | National NewsU.S. News | National News
U.S. News | National Newscoldpoet326
 
What Would You Do? With John Quinones
What Would You Do? With John QuinonesWhat Would You Do? With John Quinones
What Would You Do? With John Quinonesroastedrecluse128
 
Politics News and U.S. Elections Coverage
Politics News and U.S. Elections CoveragePolitics News and U.S. Elections Coverage
Politics News and U.S. Elections Coveragesccolumbia7779
 

What's hot (20)

Health News & Articles | Healthy Living
Health News & Articles | Healthy LivingHealth News & Articles | Healthy Living
Health News & Articles | Healthy Living
 
Politics News and U.S. Elections Coverage
Politics News and U.S. Elections CoveragePolitics News and U.S. Elections Coverage
Politics News and U.S. Elections Coverage
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC News
 
Politics News and U.S. Elections Coverage
Politics News and U.S. Elections CoveragePolitics News and U.S. Elections Coverage
Politics News and U.S. Elections Coverage
 
Politics News and U.S. Elections Coverage
Politics News and U.S. Elections CoveragePolitics News and U.S. Elections Coverage
Politics News and U.S. Elections Coverage
 
Politics News and U.S. Elections Coverage
Politics News and U.S. Elections CoveragePolitics News and U.S. Elections Coverage
Politics News and U.S. Elections Coverage
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC News
 
U.S. News | National News
U.S. News | National NewsU.S. News | National News
U.S. News | National News
 
U.S. News | National News
U.S. News | National NewsU.S. News | National News
U.S. News | National News
 
Politics News and U.S. Elections Coverage
Politics News and U.S. Elections CoveragePolitics News and U.S. Elections Coverage
Politics News and U.S. Elections Coverage
 
Politics News and U.S. Elections Coverage
Politics News and U.S. Elections CoveragePolitics News and U.S. Elections Coverage
Politics News and U.S. Elections Coverage
 
Politics News and U.S. Elections Coverage
Politics News and U.S. Elections CoveragePolitics News and U.S. Elections Coverage
Politics News and U.S. Elections Coverage
 
U.S. News | National News
U.S. News | National NewsU.S. News | National News
U.S. News | National News
 
Politics News and U.S. Elections Coverage
Politics News and U.S. Elections CoveragePolitics News and U.S. Elections Coverage
Politics News and U.S. Elections Coverage
 
20/20 | Investigative Journalism & News Magazine
20/20 | Investigative Journalism & News Magazine20/20 | Investigative Journalism & News Magazine
20/20 | Investigative Journalism & News Magazine
 
U.S. News | National News
U.S. News | National NewsU.S. News | National News
U.S. News | National News
 
What Would You Do? With John Quinones
What Would You Do? With John QuinonesWhat Would You Do? With John Quinones
What Would You Do? With John Quinones
 
Politics News and U.S. Elections Coverage
Politics News and U.S. Elections CoveragePolitics News and U.S. Elections Coverage
Politics News and U.S. Elections Coverage
 
U.S. News | National News
U.S. News | National NewsU.S. News | National News
U.S. News | National News
 
U.S. News | National News
U.S. News | National NewsU.S. News | National News
U.S. News | National News
 

Similar to Politics News and U.S. Elections Coverage

Politics News and U.S. Elections Coverage
Politics News and U.S. Elections CoveragePolitics News and U.S. Elections Coverage
Politics News and U.S. Elections Coveragematureocclusion27
 
Business News, Personal Finance and Money News
Business News, Personal Finance and Money NewsBusiness News, Personal Finance and Money News
Business News, Personal Finance and Money Newseminentoomph4388
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC Newswonderfulshuttl70
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC Newsalertchair8725
 
International News | World News
International News | World NewsInternational News | World News
International News | World Newsjoblessbeach6696
 
20/20 | Investigative Journalism & News Magazine
20/20 | Investigative Journalism & News Magazine20/20 | Investigative Journalism & News Magazine
20/20 | Investigative Journalism & News Magazinedemonicrhythm3717
 
Business News, Personal Finance and Money News
Business News, Personal Finance and Money NewsBusiness News, Personal Finance and Money News
Business News, Personal Finance and Money Newsmoaninglunatic320
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC Newsgorgeousutopia536
 
What Would You Do? With John Quinones
What Would You Do? With John QuinonesWhat Would You Do? With John Quinones
What Would You Do? With John Quinonesnumberlesspasto93
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC Newspainstakingsled66
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC Newsoceanicrainbow854
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC Newshonorablejourna10
 
Politics News and U.S. Elections Coverage
Politics News and U.S. Elections CoveragePolitics News and U.S. Elections Coverage
Politics News and U.S. Elections Coveragetalloration5719
 
What Would You Do? With John Quinones
What Would You Do? With John QuinonesWhat Would You Do? With John Quinones
What Would You Do? With John Quinonesalertchair8725
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC Newstalloration5719
 

Similar to Politics News and U.S. Elections Coverage (15)

Politics News and U.S. Elections Coverage
Politics News and U.S. Elections CoveragePolitics News and U.S. Elections Coverage
Politics News and U.S. Elections Coverage
 
Business News, Personal Finance and Money News
Business News, Personal Finance and Money NewsBusiness News, Personal Finance and Money News
Business News, Personal Finance and Money News
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC News
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC News
 
International News | World News
International News | World NewsInternational News | World News
International News | World News
 
20/20 | Investigative Journalism & News Magazine
20/20 | Investigative Journalism & News Magazine20/20 | Investigative Journalism & News Magazine
20/20 | Investigative Journalism & News Magazine
 
Business News, Personal Finance and Money News
Business News, Personal Finance and Money NewsBusiness News, Personal Finance and Money News
Business News, Personal Finance and Money News
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC News
 
What Would You Do? With John Quinones
What Would You Do? With John QuinonesWhat Would You Do? With John Quinones
What Would You Do? With John Quinones
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC News
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC News
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC News
 
Politics News and U.S. Elections Coverage
Politics News and U.S. Elections CoveragePolitics News and U.S. Elections Coverage
Politics News and U.S. Elections Coverage
 
What Would You Do? With John Quinones
What Would You Do? With John QuinonesWhat Would You Do? With John Quinones
What Would You Do? With John Quinones
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC News
 

More from creepypreview6376

Is it arrogant to draw self portraits?
Is it arrogant to draw self portraits?Is it arrogant to draw self portraits?
Is it arrogant to draw self portraits?creepypreview6376
 
Champions League draw: Real Madrid lands minnow Ludogorets
Champions League draw: Real Madrid lands minnow LudogoretsChampions League draw: Real Madrid lands minnow Ludogorets
Champions League draw: Real Madrid lands minnow Ludogoretscreepypreview6376
 
Is there any way I can make money from drawing?
Is there any way I can make money from drawing?Is there any way I can make money from drawing?
Is there any way I can make money from drawing?creepypreview6376
 
An Error has occured | Reuters.com
An Error has occured | Reuters.comAn Error has occured | Reuters.com
An Error has occured | Reuters.comcreepypreview6376
 

More from creepypreview6376 (6)

Is it arrogant to draw self portraits?
Is it arrogant to draw self portraits?Is it arrogant to draw self portraits?
Is it arrogant to draw self portraits?
 
How to save money in 2013
How to save money in 2013How to save money in 2013
How to save money in 2013
 
Champions League draw: Real Madrid lands minnow Ludogorets
Champions League draw: Real Madrid lands minnow LudogoretsChampions League draw: Real Madrid lands minnow Ludogorets
Champions League draw: Real Madrid lands minnow Ludogorets
 
Is there any way I can make money from drawing?
Is there any way I can make money from drawing?Is there any way I can make money from drawing?
Is there any way I can make money from drawing?
 
An Error has occured | Reuters.com
An Error has occured | Reuters.comAn Error has occured | Reuters.com
An Error has occured | Reuters.com
 
The Fast Draw - CBS News
The Fast Draw - CBS NewsThe Fast Draw - CBS News
The Fast Draw - CBS News
 

Politics News and U.S. Elections Coverage

  • 1. Politics News and U.S. Elections Coverage " newsbulletin.nbFooter="". // append widget header. $("#newsbulletin >>. midcontainer "). append("");.$("#newsbulletin >. midcontainer"). append(newsbulletin.nbContainer);.$("#newsbulletin >. midcontainer"). append (newsbulletin.nbFooter );. newsbulletin.nbDiv=document.getElementById('nbItemContainer' );. nbjsId =0;. newsbulletin.load=feature().// sharp(newsbulletin.baseloc+'/&xmldata/newsbulletin? id=14635979 & twOverride=&& lpos='+newsbulletin.lpos+'& section=& '+ nbjsId )// to try as well as take care of caching in webkit web browsers. dynamicJS.load('newsBulletin'+nbjsId, newsbulletin.baseloc+'/ xmldata/newsbulletin&? id=&14635979 & twOverride=& lpos=&'+newsbulletin.lpos2+'& area=&'+nbjsId);// dynamicJS.load('newsBulletin','http://preview.abcnews.go.com/xmldata/newsbulletin?id=13564505'); . // screen products. newsbulletin.displayItems = feature(nbItemObj). // examine if condition update. this.isStatusUpdate = (nbItemObj.label == 'Standing Update')? true: untrue;. // item type class. this.itemTypeClass = (this.isStatusUpdate)?'orange':'blue';. // bg position. this.itemBgPos='ONE HUNDRED % 55 %';. if(nbItemObj.bgPos!= null). this.itemBgPos = nbItemObj.bgPos;. // author photo. this.nbItemStyle=";. this.nbH4Class='lesson=nbheader';.
  • 2. this.nbH4Style=";. this.nbItemStyleAuthor=";. if(nbItemObj.authorimage!= null && & & nbItemObj.authorimage! ="). this.nbH4Style =' design=size:210 px;';. this.nbItemStyle='background: link('+nbItemObj.authorimage+') no-repeat bottom right'//+ this.itemBgPos;. this.nbItemStyleAuthor =' nbItemContentsAuthor'. // title. this.title=" +nbItemObj.title+" ;. if(nbItemObj.link!= null && & & nbItemObj.link!= "). this.title=". // message. this.text=";. this.textCapped=";. this.morelink='More'. if(nbItemObj.text!= null).
  • 3. this.text = nbItemObj.text;. // if thing is not broadened screen covered message if relevant. if(nbItemObj.isExpanded!= true). if(nbItemObj.text.length > > 63) . this.textCapped=nbItemObj.text.substring(0, 63);. this.text=this.textCapped+'... ';. if(this.isStatusUpdate). this.text=this.textCapped+' ... '+ this.morelink;. // social. this.social=";. this.socialStyle=";. this.authorBlock=";. this.divider=";. this.fb=";. if(nbItemObj.authorfb!= null && & & nbItemObj.authorfb!="). this.fb= ". this.twitter=";.
  • 4. if(nbItemObj.authortwitter!= null && & & nbItemObj.authortwitter!="). this.twitter= ". this.bio=";. if(nbItemObj.authorbio!=null & & nbItemObj.authorbio!="& ). this.bio= "+nbItemObj.author+". this.authorBlock=" +this.bio+" . if(nbItemObj.author!= null && & & nbItemObj.author! =") this.twitter!= "). this.socialCustomStyle=";. this.social = this.fb + this.twitter;. this.socialStyle =' style="elevation:21 px; cushioning: 2px 0px;' + this.socialCustomStyle + '"';. else. this.social=";. this.textStyle=";. if(nbItemObj.authorimage!= null && & & nbItemObj.authorimage!="). this.textStyle ='style = width:208 px;';. else nbItemObj.author == "). this.textStyle =' design="padding-bottom:2 px; margin-bottom:5 px;"';. this.categoryTag=";. this.nbTextOverride=";. this.rowTemp="+this.authorBlock+" +nbItemObj.date+" +this.title+" +this.text+" +this.social+" ;. if (nbItemObj.notes). nbNotes = nbItemObj.notes;.
  • 5. nbNoteStr=";. nbNoteDivider=";. $. each(nbNotes, function(idx). nbNote = nbNotes [idx];. this.noteAuthorBlock=";. this.notefb=";. if(nbNote.noteAuthor.facebook!= null && & & nbNote.noteAuthor.facebook!="). this.notefb= ". this.notetwitter= ";. if(nbNote.noteAuthor.twitter!=null & & nbNote.noteAuthor.twitter&!="). this.notetwitter= ". this.notebio=";. if(nbNote.noteAuthor.bio!=null & & nbNote.noteAuthor.bio &&!="). this.notebio= "+nbNote.noteAuthor.name+". this.noteAuthorBlock="+this.notebio+". this.notesocial =";. this.noteSocialStyle=";. if(nbNote.noteAuthor.name!=null & & nbNote.noteAuthor.name &&!="). if(this.notefb!= "else. this.notesocial="; . if(idx = =nbNotes.length-1). nbNoteDivider=";. this.nbNoteDiv=" +nbNote.noteHeadline+" +this.noteAuthorBlock+" +nbNote.noteOverview+" +this.notesocial+" ;. nbNoteStr += this.nbNoteDiv;. );. this.rowTemp += nbNoteStr;. return this.rowTemp;. feature showMoreText(id).
  • 6. // snatch aged thing elevation. var oldItemHeight = $('#nbItem _'+id). elevation();. // recover the material from the variety. $('#text _'+id). html(contentObject [id]. // establishment id a listing of opened up items. fullTextList.push(id.toString());. var newContainerHeight = $("#nbItemContainer"). elevation() + ($('#nbItem _'+id). elevation()- oldItemHeight);. $("#nbItemContainer"). css('elevation', newContainerHeight);. // reinitialize scroll. window.api.reinitialise();. lastNBObjStr=";. feature isNewData(information). isNewTemp = incorrect;. currNBObjStr=";. $. each(data.updates, feature(ind). currNBObjStr = currNBObjStr + data.updates [ind] objId + data.updates [ind] date;. );. // console.log('x'+currNBObjStr);. // console.log('y'+lastNBObjStr);. if(currNBObjStr!= lastNBObjStr). isNewTemp = true;. else. // console.log('no revitalize');. lastNBObjStr = currNBObjStr;. return isNewTemp;.
  • 7. isHeaderLinkLoaded = untrue;// flag to inspect if the header web link is packed. isShareLinkLoaded = untrue;// flag to examine if the share link is loaded. isDoneLoading = false;// flag to check if the html is done filling in the jScrollPane. function newsBulletin(information). if(information). isNewDataFlag = isNewData(information);. if(isNewDataFlag). // clear materials initially. newsbulletin.nbDiv.innerHTML=";. // console.log('refresh');. updates = data.updates;. headerLink = data.widgetLink;. shareLink = data.shareLink;. if (headerLink!= "& & headerLink!= null && & &! isHeaderLinkLoaded ). var twitterImg=" " $("#newsbulletin >>. midcontainer >>. widget_head"). append("");. $("#newsbulletin >>. midcontainer >>. widget_head >>. twitterLink a >>. twitterContent"). append("" + twitterImg + "");. isHeaderLinkLoaded = true;. // clear the author cutouts collection. newsbulletin.authorCutouts = [];. // check to see if there is an elevation set for container, if so clear it. // protects against cacheing. var hasHeight = $('#nbItemContainer'). attr('style');. if (typeof hasHeight!= 'undefined'). $('#nbItemContainer'). removeAttr('style');.
  • 8. $. each(updates, function(ind). var itemDetails = new Object();. it = updates [ind];. // occupy the itemDetails object. itemDetails.id = it.objId;. itemDetails.title = it.title;. itemDetails.objType = it.objType;. itemDetails.link = it.link;. itemDetails.date = it.date;. itemDetails.label = it.label;. itemDetails.author = it.author.name;. itemDetails.authorbio = it.author.bio;. itemDetails.authorfb = it.author.facebook;. itemDetails.authortwitter = it.author.twitter;. itemDetails.feed = it.feed;. itemDetails.category = it.category;. // established defaults if thing is a condition upgrade. if(itemDetails.label == 'Condition Update'). if(it.author.image == "). it.author.image='http://a.abcnews.com/assets/images/abc_news_logo_84x84.png'. if(it.author.name == "). itemDetails.author='ABC Information'. itemDetails.authorfb='http://www.facebook.com/abcnews'. itemDetails.authortwitter='http://twitter.com/abc'. // simply pass the writer photo if it's not presented in any one of the things yet. if($. inArray(it.author.image, newsbulletin.authorCutouts) == -1).
  • 9. itemDetails.authorimage = it.author.image;. // include to neglect list. if(it.author.image!= "& &($. inArray(it.author.image, newsbulletin.authorCutouts) == -1)). newsbulletin.authorCutouts.push(it.author.image);. if(it.text!= "). itemDetails.text = it.text;. else. itemDetails.bgPos='bottom right';. if (it.notes). itemDetails.notes = it.notes;. // develop a name worth set list of id/text. contentObject [itemDetails.id] = itemDetails.text. itemDetails.isExpanded = ($. inArray(itemDetails.id, fullTextList) > > -1)? true: untrue;. // develop markup. $("#nbItemContainer"). append(newsbulletin.displayItems(itemDetails));. );. $("#nbItemContainer"). append -LRB-''-RRB-;. // set the elevation of container div. $("#nbItemContainer"). css('elevation',$("#nbItemContainer"). height());. if (shareLink!= "& & shareLink!= null && & &! isShareLinkLoaded) .$("#newsbulletin >>. midcontainer >>. nbFooter"). css("elevation":"35px", "border-top":"1px solid #d 5d5d5", "border-bottom":"border-bottom:1 px solid #eaeaea");. $("#newsbulletin >>. midcontainer >>. nbFooter"). append("");. isShareLinkLoaded = real;. if($. browser.msie). if ($. browser.version. midcontainer >>. nbFooter"). css("screen":"none");.
  • 10. var timeoutId = setTimeout(function(). $("#newsbulletin >>. midcontainer >>. nbFooter"). css("display":"block");. clearTimeout(timeoutId);. , 3000);. dynamicJS.unload('newsBulletin'+nbjsId, newsbulletin.baseloc+'/ xmldata/newsbulletin? id=14635979&&'+nbjsId);. isDoneLoading = real;. if ($. browser.webkit). if(nbjsId. midcontainer >>. nbFooter"). css("display screen":"none");. var timeoutId = setTimeout(function(). $("#newsbulletin >>. midcontainer >>. nbFooter"). css("screen":"block");. clearTimeout(timeoutId);. , 3000);. 7500). setInterval(. function(). window.api.getContentPane(). html(. newsbulletin.load(). );. ,. 60000. );. setInterval(feature(). // we can call "pane.jScrollPane(setups)" once more however it is. // more convenient to call via the API as then the initial. // settings we came on are automatically remembered.
  • 11. // Initialization of the container ought to be done nevertheless the markup has been filled. // since there is no audience that can be passed into reinitialise() for callback. if (isDoneLoading). window.api.reinitialise();. isDoneLoading = false;. , 5000);. ;. addOnload(newsbulletin.load());.