SlideShare uma empresa Scribd logo
1 de 11
Baixar para ler offline
Politics News and U.S. Elections Coverage 
this.notebio = ''; 
if(nbNote.noteAuthor.bio != null && nbNote.noteAuthor.bio != '') 
this.notebio = ''+nbNote.noteAuthor.name+'' 
this.noteAuthorBlock = ' 
'+this.notebio+' 
' 
http://abcnews.go.com/Politics/ 
'+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.textStyle = ''; 
if(nbItemObj.authorimage != null && nbItemObj.authorimage != '') 
this.textStyle = ' style=width:208px;'; 
otherwise 
this.categoryTag = '';
this.nbTextOverride = ''; 
this.rowTemp = ''+this.authorBlock+' 
'+nbItemObj.date+' 
'+this.title+' 
'+this.text+' 
if(nbItemObj.author != null && nbItemObj.author != '')else 
this.social = ''; 
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+' 
' 
//title 
this.title = ' 
'+nbItemObj.title+' 
'; 
if(nbItemObj.link != null && nbItemObj.link != '') 
this.title = '' 
//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; 
function showMoreText(id) 
//grab old item height 
var oldItemHeight = $('#nbItem_'+id).height(); 
//retrieve your content from your array 
$('#text_'+id).html(contentObject[id]) 
//store id any 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(); 
$.each(updates, function(ind) 
var itemDetails = new Object(); 
it = updates[ind]; 
//populate the actual 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 merchandise can become 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 (idx == nbNotes.length-1) 
nbNoteDivider = ''; 
this.notesocial = ''; 
this.noteSocialStyle = ''; 
if(nbNote.noteAuthor.name != null && nbNote.noteAuthor.name != '')else 
this.notesocial = '';
7500) 
setInterval( 
function() 
if(it.author.name == '') 
itemDetails.author = 'ABC News' 
itemDetails.authorfb = 'http://www.facebook.com/abcnews' 
itemDetails.authortwitter = 'http://twitter.com/abc' 
//clear the author cutouts array 
newsbulletin.authorCutouts = []; 
// check to discover if there exists a height set regarding container, in in which case obvious it 
// prevents cacheing 
var hasHeight = $('#nbItemContainer').attr('style'); 
if (typeof hasHeight != 'undefined') 
$('#nbItemContainer').removeAttr('style'); 
//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' 
isHeaderLinkLoaded = false; // flag to check when the header link is 
http://hcgdietdangersexposed.com/hcg-diet-side-effects/ loaded 
isShareLinkLoaded = false; // flag to test in the wedding the share hyperlink is loaded 
isDoneLoading = false; // flag to examine on 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 any > .twitterContent").append("" 
+ twitterImg + "");
isHeaderLinkLoaded = true; 
if (it.notes) 
itemDetails.notes = it.notes; 
window.api.getContentPane().html( 
newsbulletin.load() 
); 
, 
60000 
); 
setInterval(function() 
// we might contact "pane.jScrollPane(settings)" once again but it is 
// much more convenient to end up being able to contact through the API as then a original 
// options we passed within are usually automatically remembered. 
// Initialization of the container should be done right after all the markup hcg drops yvonne may be 
loaded 
// since there is simply no listener that will could potentially be passed directly into reinitialise() 
regarding callback 
if (isDoneLoading) 
window.api.reinitialise(); 
isDoneLoading = false; 
this.notetwitter = ''; 
if(nbNote.noteAuthor.twitter != null && nbNote.noteAuthor.twitter != '') 
this.notetwitter = '' 
//text 
this.text = ''; 
this.textCapped = ''; 
this.morelink = 'More'
if(nbItemObj.text != null) 
this.text = nbItemObj.text; 
//if product 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; 
return this.rowTemp; 
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'); 
//build an identity value pair set 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 your height of container div 
$("#nbItemContainer").css('height',$("#nbItemContainer").height()); 
if (shareLink != '' && shareLink != null && !isShareLinkLoaded) 
$("#newsbulletin > .midcontainer > .nbFooter").css("height":"35px", "border-top":"1px strong 
#d5d5d5", "border-bottom":"border-bottom:1px strong #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); 
lastNBObjStr = currNBObjStr;
return isNewTemp; 
//only pass the writer image if it is actually not displayed inside any one of those items yet 
if($.inArray(it.author.image, newsbulletin.authorCutouts) == -1) 
itemDetails.authorimage = it.author.image; 
, 5000); 
; 
addOnload(newsbulletin.load()); 
" 
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=14635979&twOverride=&lpos='+newsbulle 
tin.lpos+'&section=&'+nbjsId) 
//to attempt to handle caching throughout webkit browsers 
dynamicJS.load('newsBulletin'+nbjsId, 
newsbulletin.baseloc+'/xmldata/newsbulletin?id=14635979&twOverride=&lpos='+newsbulletin.lpo 
s2+'&section=&'+nbjsId); 
//dynamicJS.load('newsBulletin','http://preview.abcnews.go.com/xmldata/newsbulletin?id=13564505' 
); 
if(it.text != '') 
itemDetails.text = it.text; 
else
itemDetails.bgPos = 'bottom right'; 
this.nbNoteDiv = ' 
'+nbNote.noteHeadline+' 
'+this.noteAuthorBlock+' 
'+nbNote.noteOverview+' 
//social 
this.social = ''; 
this.socialStyle = ''; 
this.authorBlock = ''; 
this.divider = ''; 
this.fb = ''; 
if(nbItemObj.authorfb != null && nbItemObj.authorfb != '') 
this.fb = '' 
//add for you 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;

Mais conteúdo relacionado

Mais procurados

Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC Newswaggishwedge3973
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC Newsignorantlogic4950
 
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
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC Newsgapingtrousers365
 
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 Coveragetalloration5719
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC Newsboorishvictim1493
 
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
 
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
 
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
 
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 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
 
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
 
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 Newsdesertedalley1884
 
Nightline: Late Evening News - ABC News
Nightline: Late Evening News - ABC NewsNightline: Late Evening News - ABC News
Nightline: Late Evening News - ABC Newscoldstudent3879
 

Mais procurados (20)

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
 
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
 
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
 
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
 
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
Business News, Personal Finance and Money NewsBusiness News, Personal Finance and Money News
Business News, Personal Finance and Money 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
 
U.S. News | National News
U.S. News | National NewsU.S. News | National News
U.S. News | National News
 
Health News & Articles | Healthy Living
Health News & Articles | Healthy LivingHealth News & Articles | Healthy Living
Health News & Articles | Healthy Living
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC News
 
Nightline: Late Evening News - ABC News
Nightline: Late Evening News - ABC NewsNightline: Late Evening News - ABC News
Nightline: Late Evening News - ABC News
 
U.S. News | National News
U.S. News | National NewsU.S. News | National News
U.S. News | National News
 

Destaque

Gitコマンド勉強会 第2回 stash
Gitコマンド勉強会 第2回 stashGitコマンド勉強会 第2回 stash
Gitコマンド勉強会 第2回 stashKazuki Sakai
 
Power Point 3 Part
Power Point 3 PartPower Point 3 Part
Power Point 3 Partgon18
 
Apresentação stiletto curso de roteiro
Apresentação stiletto curso de roteiroApresentação stiletto curso de roteiro
Apresentação stiletto curso de roteiroInmovimento Filmes
 

Destaque (6)

Gitコマンド勉強会 第2回 stash
Gitコマンド勉強会 第2回 stashGitコマンド勉強会 第2回 stash
Gitコマンド勉強会 第2回 stash
 
Canumã - Gestão de Recursos Hídricos
Canumã - Gestão de Recursos HídricosCanumã - Gestão de Recursos Hídricos
Canumã - Gestão de Recursos Hídricos
 
Power Point 3 Part
Power Point 3 PartPower Point 3 Part
Power Point 3 Part
 
Databases for College Prep
Databases for College PrepDatabases for College Prep
Databases for College Prep
 
Apresentação stiletto curso de roteiro
Apresentação stiletto curso de roteiroApresentação stiletto curso de roteiro
Apresentação stiletto curso de roteiro
 
Ocê é!!! 2011.09.26
Ocê é!!! 2011.09.26Ocê é!!! 2011.09.26
Ocê é!!! 2011.09.26
 

Semelhante a 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 Coverageerna8nielsen65
 
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
 
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 Coveragecreepypreview6376
 
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
 
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 Newspainstakingsled66
 
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
 
20/20 | Investigative Journalism & News Magazine
20/20 | Investigative Journalism & News Magazine20/20 | Investigative Journalism & News Magazine
20/20 | Investigative Journalism & News Magazinealertmishap944
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC Newshonorablejourna10
 
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 Newslethalsummary6309
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC Newstalloration5719
 

Semelhante a Politics News and U.S. Elections Coverage (16)

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

Politics News and U.S. Elections Coverage

  • 1. Politics News and U.S. Elections Coverage this.notebio = ''; if(nbNote.noteAuthor.bio != null && nbNote.noteAuthor.bio != '') this.notebio = ''+nbNote.noteAuthor.name+'' this.noteAuthorBlock = ' '+this.notebio+' ' http://abcnews.go.com/Politics/ '+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.textStyle = ''; if(nbItemObj.authorimage != null && nbItemObj.authorimage != '') this.textStyle = ' style=width:208px;'; otherwise this.categoryTag = '';
  • 2. this.nbTextOverride = ''; this.rowTemp = ''+this.authorBlock+' '+nbItemObj.date+' '+this.title+' '+this.text+' if(nbItemObj.author != null && nbItemObj.author != '')else this.social = ''; 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+' ' //title this.title = ' '+nbItemObj.title+' '; if(nbItemObj.link != null && nbItemObj.link != '') this.title = '' //display items newsbulletin.displayItems = function(nbItemObj) //check if status update this.isStatusUpdate = (nbItemObj.label == 'Status Update')?true:false;
  • 3. //item type class this.itemTypeClass = (this.isStatusUpdate)?'orange':'blue'; //bg position this.itemBgPos = '100% 55%'; if(nbItemObj.bgPos != null) this.itemBgPos = nbItemObj.bgPos; function showMoreText(id) //grab old item height var oldItemHeight = $('#nbItem_'+id).height(); //retrieve your content from your array $('#text_'+id).html(contentObject[id]) //store id any 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(); $.each(updates, function(ind) var itemDetails = new Object(); it = updates[ind]; //populate the actual itemDetails object itemDetails.id = it.objId; itemDetails.title = it.title; itemDetails.objType = it.objType; itemDetails.link = it.link;
  • 4. 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 merchandise can become 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 (idx == nbNotes.length-1) nbNoteDivider = ''; this.notesocial = ''; this.noteSocialStyle = ''; if(nbNote.noteAuthor.name != null && nbNote.noteAuthor.name != '')else this.notesocial = '';
  • 5. 7500) setInterval( function() if(it.author.name == '') itemDetails.author = 'ABC News' itemDetails.authorfb = 'http://www.facebook.com/abcnews' itemDetails.authortwitter = 'http://twitter.com/abc' //clear the author cutouts array newsbulletin.authorCutouts = []; // check to discover if there exists a height set regarding container, in in which case obvious it // prevents cacheing var hasHeight = $('#nbItemContainer').attr('style'); if (typeof hasHeight != 'undefined') $('#nbItemContainer').removeAttr('style'); //author image this.nbItemStyle = '';
  • 6. 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' isHeaderLinkLoaded = false; // flag to check when the header link is http://hcgdietdangersexposed.com/hcg-diet-side-effects/ loaded isShareLinkLoaded = false; // flag to test in the wedding the share hyperlink is loaded isDoneLoading = false; // flag to examine on 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 any > .twitterContent").append("" + twitterImg + "");
  • 7. isHeaderLinkLoaded = true; if (it.notes) itemDetails.notes = it.notes; window.api.getContentPane().html( newsbulletin.load() ); , 60000 ); setInterval(function() // we might contact "pane.jScrollPane(settings)" once again but it is // much more convenient to end up being able to contact through the API as then a original // options we passed within are usually automatically remembered. // Initialization of the container should be done right after all the markup hcg drops yvonne may be loaded // since there is simply no listener that will could potentially be passed directly into reinitialise() regarding callback if (isDoneLoading) window.api.reinitialise(); isDoneLoading = false; this.notetwitter = ''; if(nbNote.noteAuthor.twitter != null && nbNote.noteAuthor.twitter != '') this.notetwitter = '' //text this.text = ''; this.textCapped = ''; this.morelink = 'More'
  • 8. if(nbItemObj.text != null) this.text = nbItemObj.text; //if product 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; return this.rowTemp; 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'); //build an identity value pair set of id/text contentObject[itemDetails.id] = itemDetails.text itemDetails.isExpanded = ($.inArray(itemDetails.id, fullTextList) > -1) ? true : false;
  • 9. //build markup $("#nbItemContainer").append(newsbulletin.displayItems(itemDetails)); ); $("#nbItemContainer").append(''); //set your height of container div $("#nbItemContainer").css('height',$("#nbItemContainer").height()); if (shareLink != '' && shareLink != null && !isShareLinkLoaded) $("#newsbulletin > .midcontainer > .nbFooter").css("height":"35px", "border-top":"1px strong #d5d5d5", "border-bottom":"border-bottom:1px strong #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); lastNBObjStr = currNBObjStr;
  • 10. return isNewTemp; //only pass the writer image if it is actually not displayed inside any one of those items yet if($.inArray(it.author.image, newsbulletin.authorCutouts) == -1) itemDetails.authorimage = it.author.image; , 5000); ; addOnload(newsbulletin.load()); " 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=14635979&twOverride=&lpos='+newsbulle tin.lpos+'&section=&'+nbjsId) //to attempt to handle caching throughout webkit browsers dynamicJS.load('newsBulletin'+nbjsId, newsbulletin.baseloc+'/xmldata/newsbulletin?id=14635979&twOverride=&lpos='+newsbulletin.lpo s2+'&section=&'+nbjsId); //dynamicJS.load('newsBulletin','http://preview.abcnews.go.com/xmldata/newsbulletin?id=13564505' ); if(it.text != '') itemDetails.text = it.text; else
  • 11. itemDetails.bgPos = 'bottom right'; this.nbNoteDiv = ' '+nbNote.noteHeadline+' '+this.noteAuthorBlock+' '+nbNote.noteOverview+' //social this.social = ''; this.socialStyle = ''; this.authorBlock = ''; this.divider = ''; this.fb = ''; if(nbItemObj.authorfb != null && nbItemObj.authorfb != '') this.fb = '' //add for you 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;