-/*!
- * Ext JS Library 3.0.0
- * Copyright(c) 2006-2009 Ext JS, LLC
- * licensing@extjs.com
- * http://www.extjs.com/license
- */
-FeedViewer = {};\r
-\r
-Ext.onReady(function(){\r
- Ext.QuickTips.init();\r
-\r
- Ext.state.Manager.setProvider(new Ext.state.SessionProvider({state: Ext.appState}));\r
-\r
- var tpl = Ext.Template.from('preview-tpl', {\r
- compiled:true,\r
- getBody : function(v, all){\r
- return Ext.util.Format.stripScripts(v || all.description);\r
- }\r
- });\r
- FeedViewer.getTemplate = function(){\r
- return tpl;\r
- }\r
-\r
- var feeds = new FeedPanel();\r
- var mainPanel = new MainPanel();\r
-\r
- feeds.on('feedselect', function(feed){\r
- mainPanel.loadFeed(feed);\r
- });\r
- \r
- var viewport = new Ext.Viewport({\r
- layout:'border',\r
- items:[\r
- new Ext.BoxComponent({ // raw element\r
- region:'north',\r
- el: 'header',\r
- height:32\r
- }),\r
- feeds,\r
- mainPanel\r
- ]\r
- });\r
-\r
- // add some default feeds\r
- feeds.addFeed({\r
- url:'http://feeds.feedburner.com/extblog',\r
- text: 'ExtJS.com Blog'\r
- }, false, true);\r
-\r
- feeds.addFeed({\r
- url:'http://extjs.com/forum/external.php?type=RSS2',\r
- text: 'ExtJS.com Forums'\r
- }, true);\r
-\r
- feeds.addFeed({\r
- url:'http://feeds.feedburner.com/ajaxian',\r
- text: 'Ajaxian'\r
- }, true);\r
- \r
- Ext.get('header').on('click', function() {\r
- viewport.focus();\r
- });\r
- \r
- feeds.focus();\r
-});\r
-\r
-// This is a custom event handler passed to preview panels so link open in a new windw\r
-FeedViewer.LinkInterceptor = {\r
- render: function(p){\r
- p.body.on({\r
- 'mousedown': function(e, t){ // try to intercept the easy way\r
- t.target = '_blank';\r
- },\r
- 'click': function(e, t){ // if they tab + enter a link, need to do it old fashioned way\r
- if(String(t.target).toLowerCase() != '_blank'){\r
- e.stopEvent();\r
- window.open(t.href);\r
- }\r
- },\r
- delegate:'a'\r
- });\r
- }\r
-};
\ No newline at end of file