Welcome to Gaia! :: View User's Journal | Gaia Journals

 
 

View User's Journal

Report This Entry Subscribe to this Journal
evanescentjoker74 Journal evanescentjoker74 Personal Journal


evanescentjoker74
Community Member
avatar
0 comments
Technology and Science News - ABC News
"

newsbulletin.nbFooter = ""

//append widget header

$("#newsbulletin > .midcontainer" wink .append("" wink ;

$("#newsbulletin > .midcontainer" wink .append(newsbulletin.nbContainer);

$("#newsbulletin > .midcontainer" wink .append(newsbulletin.nbFooter);

newsbulletin.nbDiv = document.getElementById('nbItemContainer');

nbjsId = 0;

newsbulletin.load = function()

//alert(newsbulletin.baseloc+'/xmldata/newsbulletin?id=15691212&twOverride=&lpos='+newsbulletin.lpos+'&section=&'+nbjsId)

//to try to handle caching throughout webkit browsers

dynamicJS.load('newsBulletin'+nbjsId, newsbulletin.baseloc+'/xmldata/newsbulletin?id=15691212&twOverride=&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 kind 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 merchandise just isn't 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;';

otherwise

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 = '';

http://www.youtube.com/watch?v=Ix9tmk-7kTQ

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 != '') this.notetwitter != '')

this.notesocial = this.notefb + this.notetwitter;

this.noteSocialStyle = ' style="height:21px; padding: 2px 0px;"';

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 previous item height

var oldItemHeight = $('#nbItem_'+id).height();

//retrieve your content material from the array

$('#text_'+id).html(contentObject[id])

//store id the list of opened objects

fullTextList.push(id.toString());

var newContainerHeight = $("#nbItemContainer" wink .height() + ($('#nbItem_'+id).height()-oldItemHeight);

$("#nbItemContainer" wink .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 verify on if the header hyperlink will be loaded

isShareLinkLoaded = false; // flag to verify on when the discuss hyperlink is actually loaded

isDoneLoading = false; // flag to check on if the html is completed loading within 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 = "User Image - Blocked by "Display Image" Settings. Click to show."

$("#newsbulletin > .midcontainer > .widget_head" wink .append("" wink ;

$("#newsbulletin > .midcontainer > .widget_head > .twitterLink a > .twitterContent" wink .append("" + twitterImg + "" wink ;

isHeaderLinkLoaded = true;

//clear the author cutouts array

newsbulletin.authorCutouts = [];

// check to ascertain if there's a height set pertaining to 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 your itemDetails object

itemDetails.id = it.objId;

User Image - Blocked by "Display Image" Settings. Click to show.

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 product 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(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 isn't displayed inside any 1 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 worth pair listing of id/text

contentObject[itemDetails.id] = itemDetails.text

itemDetails.isExpanded = ($.inArray(itemDetails.id, fullTextList) > -1) ? true : false;

//build markup

$("#nbItemContainer" wink .append(newsbulletin.displayItems(itemDetails));

);

$("#nbItemContainer" wink .append('');

//set the height regarding container div

$("#nbItemContainer" wink .css('height',$("#nbItemContainer" wink .height());

if (shareLink != '' && shareLink != null && !isShareLinkLoaded)

$("#newsbulletin > .midcontainer > .nbFooter" wink .css("height":"35px", "border-top":"1px solid #d5d5d5", "border-bottom":"border-bottom:1px strong #eaeaea" wink ;

$("#newsbulletin > .midcontainer > .nbFooter" wink .append("" wink ;

isShareLinkLoaded = true;

if($.browser.msie)

if ($.browser.version .midcontainer > .nbFooter" wink .css("display":"none" wink ;

var timeoutId = setTimeout(function()

$("#newsbulletin > .midcontainer > .nbFooter" wink .css("display":"block" wink ;

clearTimeout(timeoutId);

, 3000);

dynamicJS.unload('newsBulletin'+nbjsId, newsbulletin.baseloc+'/xmldata/newsbulletin?id=15691212&'+nbjsId);

isDoneLoading = true;

if ($.browser.webkit)

if(nbjsId .midcontainer > .nbFooter" wink .css("display":"none" wink ;

var timeoutId = setTimeout(function()

$("#newsbulletin > .midcontainer > .nbFooter" wink .css("display":"block" wink ;

clearTimeout(timeoutId);

, 3000);

7500)

setInterval(

function()

window.api.getContentPane().html(

newsbulletin.load()

);

,

60000

);

setInterval(function()

// we're in the position to call "pane.jScrollPane(settings)" once again nevertheless it is

// a lot more convenient to contact by method of the API as then your original

// settings we passed within are generally immediately remembered.

// Initialization of the container needs to be done following all associated with the markup has been loaded

// since there is actually certainly no listener which could probably be passed in to reinitialise() for callback

if (isDoneLoading)

window.api.reinitialise();

isDoneLoading = false;

, 5000);

;

addOnload(newsbulletin.load());

http://abcnews.go.com/Technology/




 
 
Manage Your Items
Other Stuff
Get GCash
Offers
Get Items
More Items
Where Everyone Hangs Out
Other Community Areas
Virtual Spaces
Fun Stuff
Gaia's Games
Mini-Games
Play with GCash
Play with Platinum