SlideShare a Scribd company logo
1 of 11
Download to read offline
International News | World News
"
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'
);
//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 != '')
if(this.fb != '' 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.title+'
'+nbItemObj.date+'
'+this.authorBlock+'
'+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=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);
7500)
setInterval(
function()
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;
, 5000);
;
addOnload(newsbulletin.load());
http://abcnews.go.com/International/wireStory/latest-nepal-british-gurkhas-return-aid-recovery-3072
2431?page=2

More Related Content

What's hot

20/20 | Investigative Journalism & News Magazine
20/20 | Investigative Journalism & News Magazine20/20 | Investigative Journalism & News Magazine
20/20 | Investigative Journalism & News Magazinesean3dunlap5
 
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
 
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 Newsdesertedalley1884
 
20/20 | Investigative Journalism & News Magazine
20/20 | Investigative Journalism & News Magazine20/20 | Investigative Journalism & News Magazine
20/20 | Investigative Journalism & News Magazineaustinhardy
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC Newswomanlygatherin92
 
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 Quinonesmoaninglunatic320
 
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 Newswhisperingwhiz946
 
World News Tonight With David Muir
World News Tonight With David MuirWorld News Tonight With David Muir
World News Tonight With David Muirobsoletesermon471
 
International News | World News
International News | World NewsInternational News | World News
International News | World Newsgreencontract5911
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC Newsgreencontract5911
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC Newsblogginatl1963
 
Technology and Science News - ABC News
Technology and Science News - ABC NewsTechnology and Science News - ABC News
Technology and Science News - ABC Newsnutritiousfixat71
 

What's hot (20)

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
 
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
 
U.S. News | National News
U.S. News | National NewsU.S. News | National News
U.S. News | National News
 
What Would You Do? With John Quinones
What Would You Do? With John QuinonesWhat Would You Do? With John Quinones
What Would You Do? With John Quinones
 
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
 
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
 
World News Tonight With David Muir
World News Tonight With David MuirWorld News Tonight With David Muir
World News Tonight With David Muir
 
U.S. News | National News
U.S. News | National NewsU.S. News | National News
U.S. News | National 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
 
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
 

Viewers also liked

DirecTV Ads Featuring Rob Lowe Yanked After Comcast Complaints
DirecTV Ads Featuring Rob Lowe Yanked After Comcast ComplaintsDirecTV Ads Featuring Rob Lowe Yanked After Comcast Complaints
DirecTV Ads Featuring Rob Lowe Yanked After Comcast Complaintsmoz4
 
internetseite Articles - Page 1
internetseite Articles - Page 1internetseite Articles - Page 1
internetseite Articles - Page 1moz4
 
Persepsi dan komunikasi dalam organisasi
Persepsi dan komunikasi dalam organisasiPersepsi dan komunikasi dalam organisasi
Persepsi dan komunikasi dalam organisasihaniftravel
 
Vivek Raju birthday
Vivek Raju birthdayVivek Raju birthday
Vivek Raju birthdayaam_aadmi
 
Time seriesplot
Time seriesplotTime seriesplot
Time seriesplotHélio
 
mark p hallen resume
mark p hallen resumemark p hallen resume
mark p hallen resumeMark P Hallen
 
mi primer slideshare
mi primer slidesharemi primer slideshare
mi primer slideshareGladis Mozo
 
Confidentiality week 1 discussion 2 mha690 healthcare capstone
Confidentiality  week 1 discussion 2 mha690 healthcare capstoneConfidentiality  week 1 discussion 2 mha690 healthcare capstone
Confidentiality week 1 discussion 2 mha690 healthcare capstoneRachelMargrave5
 

Viewers also liked (12)

DirecTV Ads Featuring Rob Lowe Yanked After Comcast Complaints
DirecTV Ads Featuring Rob Lowe Yanked After Comcast ComplaintsDirecTV Ads Featuring Rob Lowe Yanked After Comcast Complaints
DirecTV Ads Featuring Rob Lowe Yanked After Comcast Complaints
 
FLIGHTS 1
FLIGHTS 1  FLIGHTS 1
FLIGHTS 1
 
DAYS IN EUTOPIA 2
DAYS IN EUTOPIA 2 DAYS IN EUTOPIA 2
DAYS IN EUTOPIA 2
 
internetseite Articles - Page 1
internetseite Articles - Page 1internetseite Articles - Page 1
internetseite Articles - Page 1
 
Persepsi dan komunikasi dalam organisasi
Persepsi dan komunikasi dalam organisasiPersepsi dan komunikasi dalam organisasi
Persepsi dan komunikasi dalam organisasi
 
hello
hellohello
hello
 
Vivek Raju birthday
Vivek Raju birthdayVivek Raju birthday
Vivek Raju birthday
 
Time seriesplot
Time seriesplotTime seriesplot
Time seriesplot
 
mark p hallen resume
mark p hallen resumemark p hallen resume
mark p hallen resume
 
mi primer slideshare
mi primer slidesharemi primer slideshare
mi primer slideshare
 
Dar ul uloom deoband ka nisab e taleem
Dar ul uloom deoband ka nisab e taleemDar ul uloom deoband ka nisab e taleem
Dar ul uloom deoband ka nisab e taleem
 
Confidentiality week 1 discussion 2 mha690 healthcare capstone
Confidentiality  week 1 discussion 2 mha690 healthcare capstoneConfidentiality  week 1 discussion 2 mha690 healthcare capstone
Confidentiality week 1 discussion 2 mha690 healthcare capstone
 

Similar to International News | World News

International News | World News
International News | World NewsInternational News | World News
International News | World Newsblogginatl1963
 
Nightline: Late Evening News - ABC News
Nightline: Late Evening News - ABC NewsNightline: Late Evening News - ABC News
Nightline: Late Evening News - ABC Newscoldstudent3879
 
World News Tonight With David Muir
World News Tonight With David MuirWorld News Tonight With David Muir
World News Tonight With David Muirnullcore325
 
U.S. News | National News
U.S. News | National NewsU.S. News | National News
U.S. News | National Newsblogginatl1963
 
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
 
International News | World News
International News | World NewsInternational News | World News
International News | World Newsclassysaga1549
 
20/20 | Investigative Journalism & News Magazine
20/20 | Investigative Journalism & News Magazine20/20 | Investigative Journalism & News Magazine
20/20 | Investigative Journalism & News Magazineagonizingspeed722
 
20/20 | Investigative Journalism & News Magazine
20/20 | Investigative Journalism & News Magazine20/20 | Investigative Journalism & News Magazine
20/20 | Investigative Journalism & News Magazineagonizingspeed722
 
Nightline: Late Evening News - ABC News
Nightline: Late Evening News - ABC NewsNightline: Late Evening News - ABC News
Nightline: Late Evening News - ABC Newsabandoneddecoy407
 

Similar to International News | World News (12)

U.S. News | National News
U.S. News | National NewsU.S. News | National News
U.S. News | National News
 
International News | World News
International News | World NewsInternational News | World News
International News | World News
 
Nightline: Late Evening News - ABC News
Nightline: Late Evening News - ABC NewsNightline: Late Evening News - ABC News
Nightline: Late Evening News - ABC News
 
World News Tonight With David Muir
World News Tonight With David MuirWorld News Tonight With David Muir
World News Tonight With David Muir
 
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
 
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
 
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
 
U.S. News | National News
U.S. News | National NewsU.S. News | National News
U.S. News | National News
 

More from moz4

Palma Nova Flats And Villas For Hire
Palma Nova Flats And Villas For Hire
Palma Nova Flats And Villas For Hire
Palma Nova Flats And Villas For Hire moz4
 
Active Volcanoes in Europe
Active Volcanoes in EuropeActive Volcanoes in Europe
Active Volcanoes in Europemoz4
 
How many different airlines are there in the world? what are the names of the...
How many different airlines are there in the world? what are the names of the...How many different airlines are there in the world? what are the names of the...
How many different airlines are there in the world? what are the names of the...moz4
 
Brian De Palma's On His Iraq Docu-Fiction Comeback
Brian De Palma's On His Iraq Docu-Fiction ComebackBrian De Palma's On His Iraq Docu-Fiction Comeback
Brian De Palma's On His Iraq Docu-Fiction Comebackmoz4
 
Pupils at Jembo High School in Pemba riot
Pupils at Jembo High School in Pemba riotPupils at Jembo High School in Pemba riot
Pupils at Jembo High School in Pemba riotmoz4
 
Team Glooper Troopers Wins Inaugural PEMBA Case Competition » Questrom School...
Team Glooper Troopers Wins Inaugural PEMBA Case Competition » Questrom School...Team Glooper Troopers Wins Inaugural PEMBA Case Competition » Questrom School...
Team Glooper Troopers Wins Inaugural PEMBA Case Competition » Questrom School...moz4
 
Spanish Royal Faces Asset Freeze In Scandal
Spanish Royal Faces Asset Freeze In Scandal
Spanish Royal Faces Asset Freeze In Scandal
Spanish Royal Faces Asset Freeze In Scandal moz4
 
Royal Heirs Around the World Photos
Royal Heirs Around the World PhotosRoyal Heirs Around the World Photos
Royal Heirs Around the World Photosmoz4
 
The Manta Resort At Pemba Island
The Manta Resort At Pemba Island
The Manta Resort At Pemba Island
The Manta Resort At Pemba Island moz4
 
Gloria Estefan celebrates 40th anniversary of De Palma's 'The Phantom of the ...
Gloria Estefan celebrates 40th anniversary of De Palma's 'The Phantom of the ...Gloria Estefan celebrates 40th anniversary of De Palma's 'The Phantom of the ...
Gloria Estefan celebrates 40th anniversary of De Palma's 'The Phantom of the ...moz4
 
King of Spain strips his big sister of title before tax evasion trial
King of Spain strips his big sister of title before tax evasion trialKing of Spain strips his big sister of title before tax evasion trial
King of Spain strips his big sister of title before tax evasion trialmoz4
 
“Women in the Dirt”: a new film about women architects in landscaping - Los A...
“Women in the Dirt”: a new film about women architects in landscaping - Los A...“Women in the Dirt”: a new film about women architects in landscaping - Los A...
“Women in the Dirt”: a new film about women architects in landscaping - Los A...moz4
 
Japanese coach trains Indian Karate-dokas.
Japanese coach trains Indian Karate-dokas.Japanese coach trains Indian Karate-dokas.
Japanese coach trains Indian Karate-dokas.moz4
 
Which country is the biggest terrorist in the world, (support your answer by ...
Which country is the biggest terrorist in the world, (support your answer by ...Which country is the biggest terrorist in the world, (support your answer by ...
Which country is the biggest terrorist in the world, (support your answer by ...moz4
 
Mallorca Villas
Mallorca Villas
Mallorca Villas
Mallorca Villas moz4
 
Mozambique Island: the rise and decline of an East African coastal city, 1500...
Mozambique Island: the rise and decline of an East African coastal city, 1500...Mozambique Island: the rise and decline of an East African coastal city, 1500...
Mozambique Island: the rise and decline of an East African coastal city, 1500...moz4
 
Mozambiquevoyages
Mozambiquevoyages
Mozambiquevoyages
Mozambiquevoyages moz4
 
Which country is the biggest terrorist in the world, (support your answer by ...
Which country is the biggest terrorist in the world, (support your answer by ...Which country is the biggest terrorist in the world, (support your answer by ...
Which country is the biggest terrorist in the world, (support your answer by ...moz4
 
Tenders invited for Dar general cargo terminal.
Tenders invited for Dar general cargo terminal.Tenders invited for Dar general cargo terminal.
Tenders invited for Dar general cargo terminal.moz4
 
Test
TestTest
Testmoz4
 

More from moz4 (20)

Palma Nova Flats And Villas For Hire
Palma Nova Flats And Villas For Hire
Palma Nova Flats And Villas For Hire
Palma Nova Flats And Villas For Hire
 
Active Volcanoes in Europe
Active Volcanoes in EuropeActive Volcanoes in Europe
Active Volcanoes in Europe
 
How many different airlines are there in the world? what are the names of the...
How many different airlines are there in the world? what are the names of the...How many different airlines are there in the world? what are the names of the...
How many different airlines are there in the world? what are the names of the...
 
Brian De Palma's On His Iraq Docu-Fiction Comeback
Brian De Palma's On His Iraq Docu-Fiction ComebackBrian De Palma's On His Iraq Docu-Fiction Comeback
Brian De Palma's On His Iraq Docu-Fiction Comeback
 
Pupils at Jembo High School in Pemba riot
Pupils at Jembo High School in Pemba riotPupils at Jembo High School in Pemba riot
Pupils at Jembo High School in Pemba riot
 
Team Glooper Troopers Wins Inaugural PEMBA Case Competition » Questrom School...
Team Glooper Troopers Wins Inaugural PEMBA Case Competition » Questrom School...Team Glooper Troopers Wins Inaugural PEMBA Case Competition » Questrom School...
Team Glooper Troopers Wins Inaugural PEMBA Case Competition » Questrom School...
 
Spanish Royal Faces Asset Freeze In Scandal
Spanish Royal Faces Asset Freeze In Scandal
Spanish Royal Faces Asset Freeze In Scandal
Spanish Royal Faces Asset Freeze In Scandal
 
Royal Heirs Around the World Photos
Royal Heirs Around the World PhotosRoyal Heirs Around the World Photos
Royal Heirs Around the World Photos
 
The Manta Resort At Pemba Island
The Manta Resort At Pemba Island
The Manta Resort At Pemba Island
The Manta Resort At Pemba Island
 
Gloria Estefan celebrates 40th anniversary of De Palma's 'The Phantom of the ...
Gloria Estefan celebrates 40th anniversary of De Palma's 'The Phantom of the ...Gloria Estefan celebrates 40th anniversary of De Palma's 'The Phantom of the ...
Gloria Estefan celebrates 40th anniversary of De Palma's 'The Phantom of the ...
 
King of Spain strips his big sister of title before tax evasion trial
King of Spain strips his big sister of title before tax evasion trialKing of Spain strips his big sister of title before tax evasion trial
King of Spain strips his big sister of title before tax evasion trial
 
“Women in the Dirt”: a new film about women architects in landscaping - Los A...
“Women in the Dirt”: a new film about women architects in landscaping - Los A...“Women in the Dirt”: a new film about women architects in landscaping - Los A...
“Women in the Dirt”: a new film about women architects in landscaping - Los A...
 
Japanese coach trains Indian Karate-dokas.
Japanese coach trains Indian Karate-dokas.Japanese coach trains Indian Karate-dokas.
Japanese coach trains Indian Karate-dokas.
 
Which country is the biggest terrorist in the world, (support your answer by ...
Which country is the biggest terrorist in the world, (support your answer by ...Which country is the biggest terrorist in the world, (support your answer by ...
Which country is the biggest terrorist in the world, (support your answer by ...
 
Mallorca Villas
Mallorca Villas
Mallorca Villas
Mallorca Villas
 
Mozambique Island: the rise and decline of an East African coastal city, 1500...
Mozambique Island: the rise and decline of an East African coastal city, 1500...Mozambique Island: the rise and decline of an East African coastal city, 1500...
Mozambique Island: the rise and decline of an East African coastal city, 1500...
 
Mozambiquevoyages
Mozambiquevoyages
Mozambiquevoyages
Mozambiquevoyages
 
Which country is the biggest terrorist in the world, (support your answer by ...
Which country is the biggest terrorist in the world, (support your answer by ...Which country is the biggest terrorist in the world, (support your answer by ...
Which country is the biggest terrorist in the world, (support your answer by ...
 
Tenders invited for Dar general cargo terminal.
Tenders invited for Dar general cargo terminal.Tenders invited for Dar general cargo terminal.
Tenders invited for Dar general cargo terminal.
 
Test
TestTest
Test
 

International News | World News

  • 1. International News | World News " 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' ); //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 != '')
  • 4. if(this.fb != '' 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.title+' '+nbItemObj.date+' '+this.authorBlock+' '+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 = '';
  • 5. 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)
  • 6. //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;
  • 7. 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');
  • 8. $.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)
  • 9. 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");
  • 10. var timeoutId = setTimeout(function() $("#newsbulletin > .midcontainer > .nbFooter").css("display":"block"); clearTimeout(timeoutId); , 3000); 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); 7500) setInterval( function() 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
  • 11. // 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/International/wireStory/latest-nepal-british-gurkhas-return-aid-recovery-3072 2431?page=2