SlideShare a Scribd company logo
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 = function()
//alert(newsbulletin.baseloc+'/xmldata/newsbulletin?id=14635979twOverride=lpos='+newsbulletin.
lpos+'section='+nbjsId)
//to try and handle caching in webkit browsers
dynamicJS.load('newsBulletin'+nbjsId,
newsbulletin.baseloc+'/xmldata/newsbulletin?id=14635979twOverride=lpos='+newsbulletin.lpos2+
'section='+nbjsId);
//dynamicJS.load('newsBulletin','http://preview.abcnews.go.com/xmldata/newsbulletin?id=13564505'
);
//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;
//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'
//title
this.title = '
'+nbItemObj.title+'
';
if(nbItemObj.link != null nbItemObj.link != '')
this.title = ''
//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;
//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 != '')else
this.social = '';
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;"';
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;
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();
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');
lastNBObjStr = currNBObjStr;
return isNewTemp;
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;
//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');
$.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'
if(it.author.name == '')
itemDetails.author = 'ABC News'
itemDetails.authorfb = 'http://www.facebook.com/abcnews'
itemDetails.authortwitter = 'http://twitter.com/abc'
//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;
//add to ignore 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;
//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);
dynamicJS.unload('newsBulletin'+nbjsId,
newsbulletin.baseloc+'/xmldata/newsbulletin?id=14635979'+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);
7500)
setInterval(
function()
window.api.getContentPane().html(
newsbulletin.load()
);
,
60000
);
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;
, 5000);
;
addOnload(newsbulletin.load());
http://abcnews.go.com/Politics/wireStory/clintons-absence-south-carolina-dems-liberals-30583654

More Related Content

What's hot

U.S. News | National News
U.S. News | National NewsU.S. News | National News
U.S. News | National News
agonizingspeed722
 
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
unarmedhorse5807
 
International News | World News
International News | World NewsInternational News | World News
International News | World News
moaninglunatic320
 
International News | World News
International News | World NewsInternational News | World News
International News | World News
blogginatl1963
 
International News | World News
International News | World NewsInternational News | World News
International News | World News
greedycabin1256
 
20/20 | Investigative Journalism & News Magazine
20/20 | Investigative Journalism & News Magazine20/20 | Investigative Journalism & News Magazine
20/20 | Investigative Journalism & News Magazine
austinhardy
 
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
talloration5719
 
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
agonizingspeed722
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC News
moaninglunatic320
 
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
brendacuthbert89
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC News
painstakingsled66
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC News
womanlygatherin92
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC News
duraninmwsbnwel
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC News
whisperingwhiz946
 
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
awarequalm2586
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC News
lethalsummary6309
 
U.S. News | National News
U.S. News | National NewsU.S. News | National News
U.S. News | National News
agonizingspeed722
 
U.S. News | National News
U.S. News | National NewsU.S. News | National News
U.S. News | National News
coldmiscellany992
 
20/20 | Investigative Journalism & News Magazine
20/20 | Investigative Journalism & News Magazine20/20 | Investigative Journalism & News Magazine
20/20 | Investigative Journalism & News Magazine
agonizingspeed722
 
U.S. News | National News
U.S. News | National NewsU.S. News | National News
U.S. News | National News
aquaticelation924
 

What's hot (20)

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
 
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
 
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
 
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
 
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
 
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
 
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
 
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
 

Viewers also liked

Resume of Curtis L. Smith - 050715
Resume of Curtis L. Smith - 050715Resume of Curtis L. Smith - 050715
Resume of Curtis L. Smith - 050715Curtis L. Smith
 
Introduction to WordPress Plugin Development, WordCamp North Canton, 2015
Introduction to WordPress Plugin Development, WordCamp North Canton, 2015Introduction to WordPress Plugin Development, WordCamp North Canton, 2015
Introduction to WordPress Plugin Development, WordCamp North Canton, 2015
topher1kenobe
 
Paradise Hills – Neighborhood Report (05.15)
Paradise Hills – Neighborhood Report (05.15)Paradise Hills – Neighborhood Report (05.15)
Paradise Hills – Neighborhood Report (05.15)
Phillip J. Blanks
 
ใครว่าข้าไม่เก่ง 4
ใครว่าข้าไม่เก่ง 4ใครว่าข้าไม่เก่ง 4
ใครว่าข้าไม่เก่ง 4ผี เหลือง
 
HOJA PARROQUIAL DEL DOMINGO 4º DE ADVIENTO. CICLO C. DIA 20 DE DICIEMBRE DEL ...
HOJA PARROQUIAL DEL DOMINGO 4º DE ADVIENTO. CICLO C. DIA 20 DE DICIEMBRE DEL ...HOJA PARROQUIAL DEL DOMINGO 4º DE ADVIENTO. CICLO C. DIA 20 DE DICIEMBRE DEL ...
HOJA PARROQUIAL DEL DOMINGO 4º DE ADVIENTO. CICLO C. DIA 20 DE DICIEMBRE DEL ...
FEDERICO ALMENARA CHECA
 
Balance 2014 de Asemuch - Seminario Viña del Mar
Balance 2014 de Asemuch - Seminario Viña del MarBalance 2014 de Asemuch - Seminario Viña del Mar
Balance 2014 de Asemuch - Seminario Viña del Mar
Nelson Leiva®
 
Tic los medios y materiales de enseñanza
Tic los medios y materiales de enseñanzaTic los medios y materiales de enseñanza
Tic los medios y materiales de enseñanzaHector Aguirre
 
Stock Market Prediction and Investment Portfolio Selection Using Computationa...
Stock Market Prediction and Investment Portfolio Selection Using Computationa...Stock Market Prediction and Investment Portfolio Selection Using Computationa...
Stock Market Prediction and Investment Portfolio Selection Using Computationa...
iosrjce
 
Using Tags to adress big data and mobile challanges
Using Tags to adress big data and mobile challangesUsing Tags to adress big data and mobile challanges
Using Tags to adress big data and mobile challanges
Lars Jeppesen
 
Técnica legislativa anap (1)
Técnica legislativa anap (1)Técnica legislativa anap (1)
Técnica legislativa anap (1)
Alejandro Javier Zabaleta
 
Eng. Rami Al-Kurdi CV
Eng. Rami Al-Kurdi CVEng. Rami Al-Kurdi CV
Eng. Rami Al-Kurdi CVrami kurdi
 
A secure scheme against power exhausting attacks in hierarchical wireless sen...
A secure scheme against power exhausting attacks in hierarchical wireless sen...A secure scheme against power exhausting attacks in hierarchical wireless sen...
A secure scheme against power exhausting attacks in hierarchical wireless sen...
LogicMindtech Nologies
 
signal and system Lecture 3
signal and system Lecture 3signal and system Lecture 3
signal and system Lecture 3
iqbal ahmad
 
Social Behaviour to Self Mastery
Social Behaviour to Self MasterySocial Behaviour to Self Mastery
Social Behaviour to Self Mastery
Dark Horse Network Media Pvt Ltd
 
signal and system Lecture 2
signal and system Lecture 2signal and system Lecture 2
signal and system Lecture 2
iqbal ahmad
 
How Open Access Works for You, and Society
How Open Access Works for You, and SocietyHow Open Access Works for You, and Society
How Open Access Works for You, and Society
Right to Research
 
02 buku-panduan-guru-bahasa-malaysia-tahun-1 (1)
02 buku-panduan-guru-bahasa-malaysia-tahun-1 (1)02 buku-panduan-guru-bahasa-malaysia-tahun-1 (1)
02 buku-panduan-guru-bahasa-malaysia-tahun-1 (1)
Nawal Rahim
 
Bigdata Nedir? Hadoop Nedir? MapReduce Nedir? Big Data.
Bigdata Nedir? Hadoop Nedir? MapReduce Nedir? Big Data.Bigdata Nedir? Hadoop Nedir? MapReduce Nedir? Big Data.
Bigdata Nedir? Hadoop Nedir? MapReduce Nedir? Big Data.
Zekeriya Besiroglu
 

Viewers also liked (20)

Resume of Curtis L. Smith - 050715
Resume of Curtis L. Smith - 050715Resume of Curtis L. Smith - 050715
Resume of Curtis L. Smith - 050715
 
updated CV (2)
updated CV (2)updated CV (2)
updated CV (2)
 
Introduction to WordPress Plugin Development, WordCamp North Canton, 2015
Introduction to WordPress Plugin Development, WordCamp North Canton, 2015Introduction to WordPress Plugin Development, WordCamp North Canton, 2015
Introduction to WordPress Plugin Development, WordCamp North Canton, 2015
 
Paradise Hills – Neighborhood Report (05.15)
Paradise Hills – Neighborhood Report (05.15)Paradise Hills – Neighborhood Report (05.15)
Paradise Hills – Neighborhood Report (05.15)
 
ใครว่าข้าไม่เก่ง 4
ใครว่าข้าไม่เก่ง 4ใครว่าข้าไม่เก่ง 4
ใครว่าข้าไม่เก่ง 4
 
Untitled Presentation
Untitled PresentationUntitled Presentation
Untitled Presentation
 
HOJA PARROQUIAL DEL DOMINGO 4º DE ADVIENTO. CICLO C. DIA 20 DE DICIEMBRE DEL ...
HOJA PARROQUIAL DEL DOMINGO 4º DE ADVIENTO. CICLO C. DIA 20 DE DICIEMBRE DEL ...HOJA PARROQUIAL DEL DOMINGO 4º DE ADVIENTO. CICLO C. DIA 20 DE DICIEMBRE DEL ...
HOJA PARROQUIAL DEL DOMINGO 4º DE ADVIENTO. CICLO C. DIA 20 DE DICIEMBRE DEL ...
 
Balance 2014 de Asemuch - Seminario Viña del Mar
Balance 2014 de Asemuch - Seminario Viña del MarBalance 2014 de Asemuch - Seminario Viña del Mar
Balance 2014 de Asemuch - Seminario Viña del Mar
 
Tic los medios y materiales de enseñanza
Tic los medios y materiales de enseñanzaTic los medios y materiales de enseñanza
Tic los medios y materiales de enseñanza
 
Stock Market Prediction and Investment Portfolio Selection Using Computationa...
Stock Market Prediction and Investment Portfolio Selection Using Computationa...Stock Market Prediction and Investment Portfolio Selection Using Computationa...
Stock Market Prediction and Investment Portfolio Selection Using Computationa...
 
Using Tags to adress big data and mobile challanges
Using Tags to adress big data and mobile challangesUsing Tags to adress big data and mobile challanges
Using Tags to adress big data and mobile challanges
 
Técnica legislativa anap (1)
Técnica legislativa anap (1)Técnica legislativa anap (1)
Técnica legislativa anap (1)
 
Eng. Rami Al-Kurdi CV
Eng. Rami Al-Kurdi CVEng. Rami Al-Kurdi CV
Eng. Rami Al-Kurdi CV
 
A secure scheme against power exhausting attacks in hierarchical wireless sen...
A secure scheme against power exhausting attacks in hierarchical wireless sen...A secure scheme against power exhausting attacks in hierarchical wireless sen...
A secure scheme against power exhausting attacks in hierarchical wireless sen...
 
signal and system Lecture 3
signal and system Lecture 3signal and system Lecture 3
signal and system Lecture 3
 
Social Behaviour to Self Mastery
Social Behaviour to Self MasterySocial Behaviour to Self Mastery
Social Behaviour to Self Mastery
 
signal and system Lecture 2
signal and system Lecture 2signal and system Lecture 2
signal and system Lecture 2
 
How Open Access Works for You, and Society
How Open Access Works for You, and SocietyHow Open Access Works for You, and Society
How Open Access Works for You, and Society
 
02 buku-panduan-guru-bahasa-malaysia-tahun-1 (1)
02 buku-panduan-guru-bahasa-malaysia-tahun-1 (1)02 buku-panduan-guru-bahasa-malaysia-tahun-1 (1)
02 buku-panduan-guru-bahasa-malaysia-tahun-1 (1)
 
Bigdata Nedir? Hadoop Nedir? MapReduce Nedir? Big Data.
Bigdata Nedir? Hadoop Nedir? MapReduce Nedir? Big Data.Bigdata Nedir? Hadoop Nedir? MapReduce Nedir? Big Data.
Bigdata Nedir? Hadoop Nedir? MapReduce Nedir? Big Data.
 

Similar to Politics News and U.S. Elections Coverage

World News Tonight With David Muir
World News Tonight With David MuirWorld News Tonight With David Muir
World News Tonight With David Muir
obsoletesermon471
 
International News | World News
International News | World NewsInternational News | World News
International News | World News
greencontract5911
 
World News Tonight With David Muir
World News Tonight With David MuirWorld News Tonight With David Muir
World News Tonight With David Muir
nullcore325
 
Home and Garden | Home Improvement and Decorating Tips
Home and Garden | Home Improvement and Decorating TipsHome and Garden | Home Improvement and Decorating Tips
Home and Garden | Home Improvement and Decorating Tips
shortguidebook822
 
Nightline: Late Evening News - ABC News
Nightline: Late Evening News - ABC NewsNightline: Late Evening News - ABC News
Nightline: Late Evening News - ABC News
coldstudent3879
 
International News | World News
International News | World NewsInternational News | World News
International News | World News
agonizingspeed722
 
International News | World News
International News | World NewsInternational News | World News
International News | World News
whisperingwhiz946
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC News
desertedalley1884
 
20/20 | Investigative Journalism & News Magazine
20/20 | Investigative Journalism & News Magazine20/20 | Investigative Journalism & News Magazine
20/20 | Investigative Journalism & News Magazine
wrathfulmedal3110
 
20/20 | Investigative Journalism & News Magazine
20/20 | Investigative Journalism & News Magazine20/20 | Investigative Journalism & News Magazine
20/20 | Investigative Journalism & News Magazine
agonizingspeed722
 
Nightline: Late Evening News - ABC News
Nightline: Late Evening News - ABC NewsNightline: Late Evening News - ABC News
Nightline: Late Evening News - ABC News
abandoneddecoy407
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC News
blogginatl1963
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC News
greencontract5911
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC News
nutritiousfixat71
 
U.S. News | National News
U.S. News | National NewsU.S. News | National News
U.S. News | National News
hallowedblasphe76
 

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

World News Tonight With David Muir
World News Tonight With David MuirWorld News Tonight With David Muir
World News Tonight With David Muir
 
International News | World News
International News | World NewsInternational News | World News
International News | World News
 
World News Tonight With David Muir
World News Tonight With David MuirWorld News Tonight With David Muir
World News Tonight With David Muir
 
Home and Garden | Home Improvement and Decorating Tips
Home and Garden | Home Improvement and Decorating TipsHome and Garden | Home Improvement and Decorating Tips
Home and Garden | Home Improvement and Decorating Tips
 
Nightline: Late Evening News - ABC News
Nightline: Late Evening News - ABC NewsNightline: Late Evening News - ABC News
Nightline: Late Evening 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
 
20/20 | Investigative Journalism & News Magazine
20/20 | Investigative Journalism & News Magazine20/20 | Investigative Journalism & News Magazine
20/20 | Investigative Journalism & News Magazine
 
20/20 | Investigative Journalism & News Magazine
20/20 | Investigative Journalism & News Magazine20/20 | Investigative Journalism & News Magazine
20/20 | Investigative Journalism & News Magazine
 
Nightline: Late Evening News - ABC News
Nightline: Late Evening News - ABC NewsNightline: Late Evening News - ABC News
Nightline: Late Evening 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
 
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

  • 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 = function() //alert(newsbulletin.baseloc+'/xmldata/newsbulletin?id=14635979twOverride=lpos='+newsbulletin. lpos+'section='+nbjsId) //to try and handle caching in webkit browsers dynamicJS.load('newsBulletin'+nbjsId, newsbulletin.baseloc+'/xmldata/newsbulletin?id=14635979twOverride=lpos='+newsbulletin.lpos2+ 'section='+nbjsId); //dynamicJS.load('newsBulletin','http://preview.abcnews.go.com/xmldata/newsbulletin?id=13564505' ); //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)
  • 2. this.itemBgPos = nbItemObj.bgPos; //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' //title this.title = ' '+nbItemObj.title+' '; if(nbItemObj.link != null nbItemObj.link != '') this.title = '' //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)
  • 3. 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 != '')else this.social = ''; this.textStyle = ''; if(nbItemObj.authorimage != null nbItemObj.authorimage != '') this.textStyle = ' style=width:208px;';
  • 4. else nbItemObj.author == '') this.textStyle = ' style="padding-bottom:2px; margin-bottom:5px;"'; 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+''
  • 5. 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; 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
  • 6. fullTextList.push(id.toString()); var newContainerHeight = $("#nbItemContainer").height() + ($('#nbItem_'+id).height()- oldItemHeight); $("#nbItemContainer").css('height', newContainerHeight); //reinitialize scroll window.api.reinitialise(); 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'); lastNBObjStr = currNBObjStr; return isNewTemp; 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)
  • 7. 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; //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'); $.each(updates, function(ind) var itemDetails = new Object(); it = updates[ind]; //populate the itemDetails object itemDetails.id = it.objId;
  • 8. 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' if(it.author.name == '') itemDetails.author = 'ABC News' itemDetails.authorfb = 'http://www.facebook.com/abcnews' itemDetails.authortwitter = 'http://twitter.com/abc' //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; //add to ignore list if(it.author.image != '' ($.inArray(it.author.image, newsbulletin.authorCutouts) == -1)) newsbulletin.authorCutouts.push(it.author.image); if(it.text != '')
  • 9. itemDetails.text = it.text; else itemDetails.bgPos = 'bottom right'; if (it.notes) itemDetails.notes = it.notes; //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); dynamicJS.unload('newsBulletin'+nbjsId, newsbulletin.baseloc+'/xmldata/newsbulletin?id=14635979'+nbjsId);
  • 10. 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); 7500) setInterval( function() window.api.getContentPane().html( newsbulletin.load() ); , 60000 ); 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; , 5000);