
Type.createNamespace('Windex');Windex.$create_NewsFeed=function(){return {};}
Windex.$create_NewsItem=function(){return {};}
Windex.$create_rssNewsResponse=function(){return {};}
Windex.$create_rssNewsItem=function(){return {};}
Windex.GlobalNews=function(domElement,urlData,feedLink){Windex.GlobalNews.constructBase(this,[domElement,'GlobalNews']);this.get_domElement().innerText='Loading news...';this.urlData=urlData;this.feedLink=feedLink;var $0='/ProxyNews?d='+urlData+'&';if(urlData.startsWith('/')){$0=urlData;}Windex.Ajax.callAjax($0,'GetNews',null,null,Delegate.create(this,this.getNews_Response),Delegate.create(this,this.getNews_Exception));}
Windex.GlobalNews.prototype={urlData:null,feedLink:null,getNews_Response:function(res,context){this.get_domElement().innerText='';var $0=res;var $1=new StringBuilder();$1.append('<table cellpadding=\'3\' cellspacing=\'0\' width=\'100%\'><tbody>');for(var $2=0;$2<$0.items.length;$2++){var $3=$0.items[$2];var $4=new Date($3.pubdate_timestamp);$1.append('<tr><td valign=\'top\' align=\'left\' width=\'10\'><span style=\'white-space: nowrap;\'>');$1.append($4.format('dd MMM').htmlEncode());$1.append('</span></td>');$1.append('<td valign=\'top\' align=\'left\' width=\'10\'>'+$4.format('yyyy').htmlEncode()+'</td>');$1.append('<td valign=\'top\' align=\'left\'>');$1.append('<a href=\"'+$3.link+'\">');$1.append($3.title);$1.append('</a></td></tr>');}$1.append('</tbody></table>');this.get_domElement().innerHTML=$1.toString();},getNews_Exception:function(res,context){this.get_domElement().innerText='Unable to load news.';this.get_domElement().title=res.Message;}}
Windex.GlobalNews.createClass('Windex.GlobalNews',ScriptFX.UI.Behavior);
// ---- Do not remove this footer ----
// Generated using Script# v0.5.1.0 (http://projects.nikhilk.net)
// -----------------------------------
