ext_panel

/* * Ext JS Library 1.1.1 * Copyright(c) 2006-2007, Ext JS, LLC. * licensing@extjs.com *  * http://www.extjs.com/license */var layout, feedPanel, innerLayout;var grid, ds, sm;var addFeed, currentItem, tpl;var suggested, feeds;var sfeeds, myfeeds;var seed = 0;var Viewer = function(){    // a bunch of private variables accessible by member function          // feed clicks bubble up to this universal handler    var feedClicked = function(e){        // find the "a" element that was clicked        var a = e.getTarget('a');        if(a){            e.preventDefault();            Viewer.loadFeed(a.href);            Viewer.changeActiveFeed(a.id.substr(5));        }      };        return {        init : function(){            // initialize state manager, we will use cookies            Ext.state.Manager.setProvider(new Ext.state.CookieProvider());                      feeds = Ext.get('feeds'); suggested = Ext.get('suggested');            // delegate clicks on the lists            feeds.on('click', feedClicked);            suggested.on('click', feedClicked);                     // create the main layout            layout = new Ext.BorderLayout(document.body, {                north: {                    split:false,                    initialSize: 80,                    titlebar: false,     margins:{top: 0, left: 0, right:0, bottom: 0}                },                west: {                    split:true,                    initialSize: 170,                    minSize: 175,                    maxSize: 400,                    titlebar: true,                    collapsible: true,                    animate: true,                    autoScroll:false,                    useShim:true,     collapsed:true,                    cmargins: {top:0,bottom:2,right:2,left:2}                },                east: {                    split:true,                    initialSize: 170,                    minSize: 175,                    maxSize: 400,                    titlebar: true,                    collapsible: true,                    animate: true,                    autoScroll:false,                    useShim:true,                    collapsed:true,                    cmargins: {top:0,bottom:2,right:2,left:2}                },      center: {     html:'<hr>',     border :false,                    titlebar: false,                    autoScroll:true,     margins:{top: 0, left: 0, right:0, bottom: 0},                    closeOnTab: false,                    alwaysShowTabs: false,                         resizeTabs: true                }                           });            // tell the layout not to perform layouts until we're done adding everything            layout.beginUpdate();            layout.add('north', new Ext.ContentPanel('header'));                        // initialize the statusbar            //south = layout.getRegion('south');                     layout.add('west', new Ext.ContentPanel('feeds', {title: 'Tool Tip', fitToFrame:true}));            layout.add('east', new Ext.ContentPanel('suggested', {title: 'My resource', fitToFrame:true}));      //                // the inner layout houses the grid panel and the preview panel            innerLayout = new Ext.BorderLayout('main', {                             });   feedPanel = new Ext.NestedLayoutPanel(innerLayout);      feedPanel.load({    url: "test.htm",    discardUrl: false,    fitContainer:true,    fitToFrame:true,    nocache: false,    text: "Loading...",    timeout: 30,    margins:{top: 10, left: 0, right:0, bottom: 0},    scripts: true   });            layout.add('center', feedPanel);      innerLayout.beginUpdate();            layout.restoreState();            layout.endUpdate();         }           };}();Ext.onReady(Viewer.init, Viewer);function changeContent(forwardpage){  feedPanel.setUrl(forwardpage);  feedPanel.refresh();  //alert(forwardpage);  /*  feedPanel.load({       html:'<hr>',    url:forwardpage ,    discardUrl: false,    nocache: false,    text: "Loading...",    timeout: 30,    scripts: true   });            layout.add('center', feedPanel);      innerLayout.beginUpdate();            layout.restoreState();            layout.endUpdate();           */}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值