?? resource-20070920.js
字號:
/*
* Ext JS Library 1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*
* @author Lingo
* @since 2007-09-20
* http://code.google.com/p/anewssystem/
*/
Ext.onReady(function(){
// 開啟提示功能
Ext.QuickTips.init();
// 使用cookies保持狀態
// TODO: 完全照抄,作用不明
Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
// 布局管理器
var layout = new Ext.BorderLayout(document.body, {
center: {
autoScroll : true,
titlebar : false,
tabPosition : 'top',
closeOnTab : true,
alwaysShowTabs : true,
resizeTabs : true,
fillToFrame : true
}
});
// 設置布局
layout.beginUpdate();
layout.add('center', new Ext.ContentPanel('tab1', {
title : '資源管理',
toolbar : null,
closable : false,
fitToFrame : true
}));
layout.add('center', new Ext.ContentPanel('tab2', {
title: "幫助",
toolbar: null,
closable: false,
fitToFrame: true
}));
layout.restoreState();
layout.endUpdate();
layout.getRegion("center").showPanel("tab1");
// 默認需要id, name, theSort, parent, children
// 其他隨意定制
var metaData = [
{id : 'id', qtip : "ID", vType : "integer", allowBlank : true, defValue : -1, w:150},
{id : 'name', qtip : "資源名稱", vType : "chn", allowBlank : false, w:150},
{id : 'resType', qtip : "資源類型", vType : "chn", allowBlank : false, w:150},
{id : 'resString', qtip : "資源內容", vType : "chn", allowBlank : false, w:150},
{id : 'descn', qtip : "描述", vType : "chn", allowBlank : true, w:170}
];
// 創建表格
var lightGrid = new Ext.lingo.JsonGrid("lightgrid", {
metaData : metaData,
dialogContent : "content"
});
// 渲染表格
lightGrid.render();
});
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -