SlideShare a Scribd company logo
1 of 11
Download to read offline
Business News, Personal Finance and Money News
//clear the author cutouts array
newsbulletin.authorCutouts = [];
// check to see if there is a height set for container, if
so clear it
// prevents cacheing
var hasHeight = $('#nbItemContainer').attr('style');
if (typeof hasHeight != 'undefined')
$('#nbItemContainer').removeAttr('style');
this.twitter = '';
if(nbItemObj.authortwitter != null && nbItemObj.authortwitter != '')
this.twitter = ''
//add to ignore list
if(it.author.image != '' &&($.inArray(it.author.image, newsbulletin.authorCutouts) == -1))
newsbulletin.authorCutouts.push(it.author.image);
'+this.notesocial+'
';
nbNoteStr += this.nbNoteDiv;
);
this.rowTemp += nbNoteStr;
//build a name value pair list of id/text
contentObject[itemDetails.id] = itemDetails.text
itemDetails.isExpanded = ($.inArray(itemDetails.id, fullTextList) > -1) ? true : false;
//build markup
$("#nbItemContainer").append(newsbulletin.displayItems(itemDetails));
);
$("#nbItemContainer").append('');
//set the height of container div
$("#nbItemContainer").css('height',$("#nbItemContainer").height());
if (shareLink != '' && shareLink != null && !isShareLinkLoaded)
$("#newsbulletin > .midcontainer > .nbFooter").css("height":"35px", "border-top":"1px solid
#d5d5d5", "border-bottom":"border-bottom:1px solid #eaeaea");
$("#newsbulletin > .midcontainer > .nbFooter").append("");
isShareLinkLoaded = true;
if($.browser.msie)
if ($.browser.version .midcontainer > .nbFooter").css("display":"none");
var timeoutId = setTimeout(function()
$("#newsbulletin > .midcontainer > .nbFooter").css("display":"block");
clearTimeout(timeoutId);
, 3000);
this.notebio = '';
if(nbNote.noteAuthor.bio != null && nbNote.noteAuthor.bio != '')
this.notebio = ''+nbNote.noteAuthor.name+''
http://sports.yahoo.com/soccer/
this.noteAuthorBlock = '
'+this.notebio+'
'
this.bio = '';
if(nbItemObj.authorbio != null && nbItemObj.authorbio != '')
this.bio = ''+nbItemObj.author+''
this.authorBlock = '
'+this.bio+'
'
if(it.author.name == '')
itemDetails.author = 'ABC News'
itemDetails.authorfb = 'http://www.facebook.com/abcnews'
itemDetails.authortwitter = 'http://twitter.com/abc'
function showMoreText(id)
//grab old item height
var oldItemHeight = $('#nbItem_'+id).height();
//retrieve the content from the array
$('#text_'+id).html(contentObject[id])
//store id a list of opened objects
fullTextList.push(id.toString());
var newContainerHeight = $("#nbItemContainer").height() + ($('#nbItem_'+id).height()-
oldItemHeight);
$("#nbItemContainer").css('height', newContainerHeight);
//reinitialize scroll
window.api.reinitialise();
U.S. District Court, Central District of California, Western Division
dynamicJS.unload('newsBulletin'+nbjsId,
newsbulletin.baseloc+'/xmldata/newsbulletin?id=14640490&'+nbjsId);
isDoneLoading = true;
if ($.browser.webkit)
if(nbjsId .midcontainer > .nbFooter").css("display":"none");
var timeoutId = setTimeout(function()
$("#newsbulletin > .midcontainer > .nbFooter").css("display":"block");
clearTimeout(timeoutId);
, 3000);
this.textStyle = '';
if(nbItemObj.authorimage != null && nbItemObj.authorimage != '')
this.textStyle = ' style=width:208px;';
else nbItemObj.author == '')
this.textStyle = ' style="padding-bottom:2px; margin-bottom:5px;"';
if(it.text != '')
itemDetails.text = it.text;
else
itemDetails.bgPos = 'bottom right';
//title
this.title = '
'+nbItemObj.title+'
';
if(nbItemObj.link != null && nbItemObj.link != '')
this.title = ''
this.notetwitter = '';
if(nbNote.noteAuthor.twitter != null && nbNote.noteAuthor.twitter != '')
this.notetwitter = ''
if(nbItemObj.author != null && nbItemObj.author != '')
if(this.fb != '' else
this.social = '';
"
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 = function()
//alert(newsbulletin.baseloc+'/xmldata/newsbulletin?id=14640490&twOverride=&lpos='+newsbulle
tin.lpos+'&section=&'+nbjsId)
//to try and handle caching in webkit browsers
dynamicJS.load('newsBulletin'+nbjsId,
newsbulletin.baseloc+'/xmldata/newsbulletin?id=14640490&twOverride=&lpos='+newsbulletin.lpo
s2+'&section=&'+nbjsId);
//dynamicJS.load('newsBulletin','http://preview.abcnews.go.com/xmldata/newsbulletin?id=13564505'
);
$.each(updates, function(ind)
var itemDetails = new Object();
it = updates[ind];
//populate 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;
//set defaults if item is a status update
if(itemDetails.label == 'Status Update')
if(it.author.image == '')
it.author.image = 'http://a.abcnews.com/assets/images/abc_news_logo_84x84.png'
return this.rowTemp;
this.categoryTag = '';
this.nbTextOverride = '';
this.rowTemp = ''+this.title+'
'+nbItemObj.date+'
'+this.authorBlock+'
'+this.text+'
//social
this.social = '';
this.socialStyle = '';
this.authorBlock = '';
this.divider = '';
this.fb = '';
if(nbItemObj.authorfb != null && nbItemObj.authorfb != '')
this.fb = ''
lastNBObjStr = '';
function isNewData(data)
isNewTemp = false;
currNBObjStr = '';
$.each(data.updates, function(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 refresh');
if (idx == nbNotes.length-1)
nbNoteDivider = '';
//only pass the author image if it's not displayed in any of the items yet
if($.inArray(it.author.image, newsbulletin.authorCutouts) == -1)
itemDetails.authorimage = it.author.image;
//text
this.text = '';
this.textCapped = '';
this.morelink = 'More'
if(nbItemObj.text != null)
this.text = nbItemObj.text;
//if item is not expanded display capped text if applicable
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;
//author image
this.nbItemStyle = '';
this.nbH4Class = 'class=nbheader';
this.nbH4Style = '';
this.nbItemStyleAuthor = '';
if(nbItemObj.authorimage != null && nbItemObj.authorimage != '')
this.nbH4Style = ' style=width:210px;';
this.nbItemStyle = 'background:url('+nbItemObj.authorimage+') no-repeat bottom right'//+
this.itemBgPos;
this.nbItemStyleAuthor = ' nbItemContentsAuthor'
//display items
newsbulletin.displayItems = function(nbItemObj)
//check if status update
this.isStatusUpdate = (nbItemObj.label == 'Status Update')?true:false;
//item type class
this.itemTypeClass = (this.isStatusUpdate)?'orange':'blue';
//bg position
this.itemBgPos = '100% 55%';
if(nbItemObj.bgPos != null)
this.itemBgPos = nbItemObj.bgPos;
isHeaderLinkLoaded = false; // flag to check if the header link is loaded
isShareLinkLoaded = false; // flag to check if the share link is loaded
isDoneLoading = false; // flag to check if the html is done loading in the jScrollPane
function newsBulletin(data)
if(data)
isNewDataFlag = isNewData(data);
if(isNewDataFlag)
//clear contents first
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;
, 5000);
;
addOnload(newsbulletin.load());
this.nbNoteDiv = '
'+nbNote.noteHeadline+'
'+this.noteAuthorBlock+'
'+nbNote.noteOverview+'
You arrive late at your hotel and all you want to do is check in, take a shower and go...
Room service is closed, and you're starving. Newsroom Graphics software program regarding
integration with Avid iNews with regard to its
daily, eighteen hour sport information channel.There's a restaurant flyer either on or...
You find the perfect late-summer rental. Excited, or maybe a little anxious about losing...
Many destinations, travel stops, restaurants, retailers and public venues provide free...
You apply for a summer job and your prospective employer informs you that you're hired,...
if (it.notes)
itemDetails.notes = it.notes;
7500)
setInterval(
function()
this.notesocial = '';
this.noteSocialStyle = '';
if(nbNote.noteAuthor.name != null && nbNote.noteAuthor.name != '')else
this.notesocial = '';
lastNBObjStr = currNBObjStr;
return isNewTemp;
window.api.getContentPane().html(
newsbulletin.load()
);
,
120000
);
setInterval(function()
// we could call "pane.jScrollPane(settings)" again but it is
// more convenient to call via the API as then the original
// settings we passed in are automatically remembered.
// Initialization of the container should be done after all the markup has been loaded
// since there is no listener that could be passed into reinitialise() for callback
if (isDoneLoading)
window.api.reinitialise();
isDoneLoading = false;
http://edition.cnn.com/SPORT/football/
'+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 = ''
best search sites

More Related Content

What's hot

Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC Newsboorishvictim1493
 
International News | World News
International News | World NewsInternational News | World News
International News | World Newsblogginatl1963
 
International News | World News
International News | World NewsInternational News | World News
International News | World Newsgreedycabin1256
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC Newstalloration5719
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC Newsdesertedalley1884
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC Newsalertchair8725
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC Newsignorantlogic4950
 
International News | World News
International News | World NewsInternational News | World News
International News | World Newsagonizingspeed722
 
International News | World News
International News | World NewsInternational News | World News
International News | World Newswhisperingwhiz946
 
20/20 | Investigative Journalism & News Magazine
20/20 | Investigative Journalism & News Magazine20/20 | Investigative Journalism & News Magazine
20/20 | Investigative Journalism & News Magazinewrathfulmedal3110
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC Newspainstakingsled66
 
20/20 | Investigative Journalism & News Magazine
20/20 | Investigative Journalism & News Magazine20/20 | Investigative Journalism & News Magazine
20/20 | Investigative Journalism & News Magazinewrathfulmedal3110
 
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 Quinoneswrathfulmedal3110
 
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 Quinonesagonizingspeed722
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC Newsnumberlesspasto93
 
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 Newsmaddeningwareho91
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC Newsenchantingsched84
 

What's hot (20)

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
 
International News | World News
International News | World NewsInternational News | World News
International News | World 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
 
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
 
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
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC News
 
20/20 | Investigative Journalism & News Magazine
20/20 | Investigative Journalism & News Magazine20/20 | Investigative Journalism & News Magazine
20/20 | Investigative Journalism & News Magazine
 
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
 
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
 
U.S. News | National News
U.S. News | National NewsU.S. News | National News
U.S. News | National 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
 
U.S. News | National News
U.S. News | National NewsU.S. News | National News
U.S. News | National News
 

Viewers also liked

Klawsky consulting-hidden cost reduction with predictive hiring
Klawsky consulting-hidden cost reduction with predictive hiringKlawsky consulting-hidden cost reduction with predictive hiring
Klawsky consulting-hidden cost reduction with predictive hiringjklawsky
 
Ijiem vol4 no3_10
Ijiem vol4 no3_10Ijiem vol4 no3_10
Ijiem vol4 no3_10Agus Witono
 
Reunion de go 30 nov 2014
Reunion de go 30 nov 2014Reunion de go 30 nov 2014
Reunion de go 30 nov 2014Oscar Ferro
 
Rakesh Ranjan Mall Visual CV
Rakesh Ranjan Mall Visual CVRakesh Ranjan Mall Visual CV
Rakesh Ranjan Mall Visual CVRakesh Mall
 
Rekenen met procenten
Rekenen met procentenRekenen met procenten
Rekenen met procentenMaaike Zijm
 
Vocational training in NTPC
Vocational training in NTPCVocational training in NTPC
Vocational training in NTPCMohindra
 
20141128 iOSチーム勉強会 My Sweet Swift
20141128 iOSチーム勉強会 My Sweet Swift20141128 iOSチーム勉強会 My Sweet Swift
20141128 iOSチーム勉強会 My Sweet Swiftnecocen
 
Daniel cosío-villegas-
Daniel cosío-villegas-Daniel cosío-villegas-
Daniel cosío-villegas-ererosales
 
160401 Leveranciersdag KING
160401 Leveranciersdag KING160401 Leveranciersdag KING
160401 Leveranciersdag KINGKING
 
2014 Lean UX 컨퍼런스 : 국내 기업의 Lean UX 실험사례
2014 Lean UX 컨퍼런스 : 국내 기업의 Lean UX 실험사례2014 Lean UX 컨퍼런스 : 국내 기업의 Lean UX 실험사례
2014 Lean UX 컨퍼런스 : 국내 기업의 Lean UX 실험사례Sue Kim
 
Cuadrante horarios
Cuadrante horarios Cuadrante horarios
Cuadrante horarios SuperPT
 

Viewers also liked (12)

Klawsky consulting-hidden cost reduction with predictive hiring
Klawsky consulting-hidden cost reduction with predictive hiringKlawsky consulting-hidden cost reduction with predictive hiring
Klawsky consulting-hidden cost reduction with predictive hiring
 
Ijiem vol4 no3_10
Ijiem vol4 no3_10Ijiem vol4 no3_10
Ijiem vol4 no3_10
 
Presentación1
Presentación1Presentación1
Presentación1
 
Reunion de go 30 nov 2014
Reunion de go 30 nov 2014Reunion de go 30 nov 2014
Reunion de go 30 nov 2014
 
Rakesh Ranjan Mall Visual CV
Rakesh Ranjan Mall Visual CVRakesh Ranjan Mall Visual CV
Rakesh Ranjan Mall Visual CV
 
Rekenen met procenten
Rekenen met procentenRekenen met procenten
Rekenen met procenten
 
Vocational training in NTPC
Vocational training in NTPCVocational training in NTPC
Vocational training in NTPC
 
20141128 iOSチーム勉強会 My Sweet Swift
20141128 iOSチーム勉強会 My Sweet Swift20141128 iOSチーム勉強会 My Sweet Swift
20141128 iOSチーム勉強会 My Sweet Swift
 
Daniel cosío-villegas-
Daniel cosío-villegas-Daniel cosío-villegas-
Daniel cosío-villegas-
 
160401 Leveranciersdag KING
160401 Leveranciersdag KING160401 Leveranciersdag KING
160401 Leveranciersdag KING
 
2014 Lean UX 컨퍼런스 : 국내 기업의 Lean UX 실험사례
2014 Lean UX 컨퍼런스 : 국내 기업의 Lean UX 실험사례2014 Lean UX 컨퍼런스 : 국내 기업의 Lean UX 실험사례
2014 Lean UX 컨퍼런스 : 국내 기업의 Lean UX 실험사례
 
Cuadrante horarios
Cuadrante horarios Cuadrante horarios
Cuadrante horarios
 

Similar to 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 Newsgapingtrousers365
 
Health News & Articles | Healthy Living
Health News & Articles | Healthy LivingHealth News & Articles | Healthy Living
Health News & Articles | Healthy Livingabortivecatcall84
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC Newswaggishwedge3973
 
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
 
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 Coveragecoldfascism4997
 
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 Coveragecreepypreview6376
 
International News | World News
International News | World NewsInternational News | World News
International News | World Newsproductiveengin27
 
20/20 | Investigative Journalism & News Magazine
20/20 | Investigative Journalism & News Magazine20/20 | Investigative Journalism & News Magazine
20/20 | Investigative Journalism & News Magazinealertmishap944
 
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
 
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 Coveragealertchair8725
 
International News | World News
International News | World NewsInternational News | World News
International News | World Newsjoblessbeach6696
 
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
 
Nightline: Late Evening News - ABC News
Nightline: Late Evening News - ABC NewsNightline: Late Evening News - ABC News
Nightline: Late Evening News - ABC Newsdynamicindividu85
 
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 Coveragecoldmiscellany992
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC Newsunarmedhorse5807
 
International News | World News
International News | World NewsInternational News | World News
International News | World Newsboringterminolo30
 
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 Coverageroastedrecluse128
 

Similar to Business News, Personal Finance and Money News (20)

Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC News
 
Health News & Articles | Healthy Living
Health News & Articles | Healthy LivingHealth News & Articles | Healthy Living
Health News & Articles | Healthy Living
 
U.S. News | National News
U.S. News | National NewsU.S. News | National News
U.S. News | National 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
 
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
 
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
 
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
 
International News | World News
International News | World NewsInternational News | World News
International News | World 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
 
Nightline: Late Evening News - ABC News
Nightline: Late Evening News - ABC NewsNightline: Late Evening News - ABC News
Nightline: Late Evening 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
 
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
 
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
 

Business News, Personal Finance and Money News

  • 1. Business News, Personal Finance and Money News //clear the author cutouts array newsbulletin.authorCutouts = []; // check to see if there is a height set for container, if so clear it // prevents cacheing var hasHeight = $('#nbItemContainer').attr('style'); if (typeof hasHeight != 'undefined') $('#nbItemContainer').removeAttr('style'); this.twitter = ''; if(nbItemObj.authortwitter != null && nbItemObj.authortwitter != '') this.twitter = '' //add to ignore list if(it.author.image != '' &&($.inArray(it.author.image, newsbulletin.authorCutouts) == -1)) newsbulletin.authorCutouts.push(it.author.image); '+this.notesocial+' '; nbNoteStr += this.nbNoteDiv; ); this.rowTemp += nbNoteStr; //build a name value pair list of id/text contentObject[itemDetails.id] = itemDetails.text itemDetails.isExpanded = ($.inArray(itemDetails.id, fullTextList) > -1) ? true : false; //build markup
  • 2. $("#nbItemContainer").append(newsbulletin.displayItems(itemDetails)); ); $("#nbItemContainer").append(''); //set the height of container div $("#nbItemContainer").css('height',$("#nbItemContainer").height()); if (shareLink != '' && shareLink != null && !isShareLinkLoaded) $("#newsbulletin > .midcontainer > .nbFooter").css("height":"35px", "border-top":"1px solid #d5d5d5", "border-bottom":"border-bottom:1px solid #eaeaea"); $("#newsbulletin > .midcontainer > .nbFooter").append(""); isShareLinkLoaded = true; if($.browser.msie) if ($.browser.version .midcontainer > .nbFooter").css("display":"none"); var timeoutId = setTimeout(function() $("#newsbulletin > .midcontainer > .nbFooter").css("display":"block"); clearTimeout(timeoutId); , 3000); this.notebio = ''; if(nbNote.noteAuthor.bio != null && nbNote.noteAuthor.bio != '') this.notebio = ''+nbNote.noteAuthor.name+'' http://sports.yahoo.com/soccer/ this.noteAuthorBlock = ' '+this.notebio+' ' this.bio = ''; if(nbItemObj.authorbio != null && nbItemObj.authorbio != '')
  • 3. this.bio = ''+nbItemObj.author+'' this.authorBlock = ' '+this.bio+' ' if(it.author.name == '') itemDetails.author = 'ABC News' itemDetails.authorfb = 'http://www.facebook.com/abcnews' itemDetails.authortwitter = 'http://twitter.com/abc' function showMoreText(id) //grab old item height var oldItemHeight = $('#nbItem_'+id).height(); //retrieve the content from the array $('#text_'+id).html(contentObject[id]) //store id a list of opened objects fullTextList.push(id.toString()); var newContainerHeight = $("#nbItemContainer").height() + ($('#nbItem_'+id).height()- oldItemHeight); $("#nbItemContainer").css('height', newContainerHeight); //reinitialize scroll window.api.reinitialise(); U.S. District Court, Central District of California, Western Division dynamicJS.unload('newsBulletin'+nbjsId, newsbulletin.baseloc+'/xmldata/newsbulletin?id=14640490&'+nbjsId); isDoneLoading = true; if ($.browser.webkit) if(nbjsId .midcontainer > .nbFooter").css("display":"none"); var timeoutId = setTimeout(function()
  • 4. $("#newsbulletin > .midcontainer > .nbFooter").css("display":"block"); clearTimeout(timeoutId); , 3000); this.textStyle = ''; if(nbItemObj.authorimage != null && nbItemObj.authorimage != '') this.textStyle = ' style=width:208px;'; else nbItemObj.author == '') this.textStyle = ' style="padding-bottom:2px; margin-bottom:5px;"'; if(it.text != '') itemDetails.text = it.text; else itemDetails.bgPos = 'bottom right'; //title this.title = ' '+nbItemObj.title+' '; if(nbItemObj.link != null && nbItemObj.link != '') this.title = '' this.notetwitter = ''; if(nbNote.noteAuthor.twitter != null && nbNote.noteAuthor.twitter != '') this.notetwitter = '' if(nbItemObj.author != null && nbItemObj.author != '') if(this.fb != '' else this.social = ''; " newsbulletin.nbFooter = ""
  • 5. //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 = function() //alert(newsbulletin.baseloc+'/xmldata/newsbulletin?id=14640490&twOverride=&lpos='+newsbulle tin.lpos+'&section=&'+nbjsId) //to try and handle caching in webkit browsers dynamicJS.load('newsBulletin'+nbjsId, newsbulletin.baseloc+'/xmldata/newsbulletin?id=14640490&twOverride=&lpos='+newsbulletin.lpo s2+'&section=&'+nbjsId); //dynamicJS.load('newsBulletin','http://preview.abcnews.go.com/xmldata/newsbulletin?id=13564505' ); $.each(updates, function(ind) var itemDetails = new Object(); it = updates[ind]; //populate 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;
  • 6. itemDetails.authortwitter = it.author.twitter; itemDetails.feed = it.feed; itemDetails.category = it.category; //set defaults if item is a status update if(itemDetails.label == 'Status Update') if(it.author.image == '') it.author.image = 'http://a.abcnews.com/assets/images/abc_news_logo_84x84.png' return this.rowTemp; this.categoryTag = ''; this.nbTextOverride = ''; this.rowTemp = ''+this.title+' '+nbItemObj.date+' '+this.authorBlock+' '+this.text+' //social this.social = ''; this.socialStyle = ''; this.authorBlock = ''; this.divider = ''; this.fb = ''; if(nbItemObj.authorfb != null && nbItemObj.authorfb != '') this.fb = '' lastNBObjStr = ''; function isNewData(data) isNewTemp = false; currNBObjStr = '';
  • 7. $.each(data.updates, function(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 refresh'); if (idx == nbNotes.length-1) nbNoteDivider = ''; //only pass the author image if it's not displayed in any of the items yet if($.inArray(it.author.image, newsbulletin.authorCutouts) == -1) itemDetails.authorimage = it.author.image; //text this.text = ''; this.textCapped = ''; this.morelink = 'More' if(nbItemObj.text != null) this.text = nbItemObj.text; //if item is not expanded display capped text if applicable if(nbItemObj.isExpanded != true) if(nbItemObj.text.length > 63) this.textCapped = nbItemObj.text.substring(0, 63); this.text = this.textCapped + '...'; if(this.isStatusUpdate)
  • 8. this.text = this.textCapped + '... ' + this.morelink; //author image this.nbItemStyle = ''; this.nbH4Class = 'class=nbheader'; this.nbH4Style = ''; this.nbItemStyleAuthor = ''; if(nbItemObj.authorimage != null && nbItemObj.authorimage != '') this.nbH4Style = ' style=width:210px;'; this.nbItemStyle = 'background:url('+nbItemObj.authorimage+') no-repeat bottom right'//+ this.itemBgPos; this.nbItemStyleAuthor = ' nbItemContentsAuthor' //display items newsbulletin.displayItems = function(nbItemObj) //check if status update this.isStatusUpdate = (nbItemObj.label == 'Status Update')?true:false; //item type class this.itemTypeClass = (this.isStatusUpdate)?'orange':'blue'; //bg position this.itemBgPos = '100% 55%'; if(nbItemObj.bgPos != null) this.itemBgPos = nbItemObj.bgPos; isHeaderLinkLoaded = false; // flag to check if the header link is loaded isShareLinkLoaded = false; // flag to check if the share link is loaded isDoneLoading = false; // flag to check if the html is done loading in the jScrollPane function newsBulletin(data) if(data)
  • 9. isNewDataFlag = isNewData(data); if(isNewDataFlag) //clear contents first 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; , 5000); ; addOnload(newsbulletin.load()); this.nbNoteDiv = ' '+nbNote.noteHeadline+' '+this.noteAuthorBlock+' '+nbNote.noteOverview+' You arrive late at your hotel and all you want to do is check in, take a shower and go... Room service is closed, and you're starving. Newsroom Graphics software program regarding integration with Avid iNews with regard to its daily, eighteen hour sport information channel.There's a restaurant flyer either on or... You find the perfect late-summer rental. Excited, or maybe a little anxious about losing... Many destinations, travel stops, restaurants, retailers and public venues provide free...
  • 10. You apply for a summer job and your prospective employer informs you that you're hired,... if (it.notes) itemDetails.notes = it.notes; 7500) setInterval( function() this.notesocial = ''; this.noteSocialStyle = ''; if(nbNote.noteAuthor.name != null && nbNote.noteAuthor.name != '')else this.notesocial = ''; lastNBObjStr = currNBObjStr; return isNewTemp; window.api.getContentPane().html( newsbulletin.load() ); , 120000 ); setInterval(function() // we could call "pane.jScrollPane(settings)" again but it is // more convenient to call via the API as then the original // settings we passed in are automatically remembered. // Initialization of the container should be done after all the markup has been loaded // since there is no listener that could be passed into reinitialise() for callback if (isDoneLoading) window.api.reinitialise();
  • 11. isDoneLoading = false; http://edition.cnn.com/SPORT/football/ '+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 = '' best search sites