📄 datemenu.js
字号:
/*
* Ext JS Library 3.0 Pre-alpha
* Copyright(c) 2006-2008, Ext JS, LLC.
* licensing@extjs.com
*
* http://extjs.com/license
*/
/**
* @class Ext.menu.DateMenu
* @extends Ext.menu.Menu
* A menu containing a {@link Ext.DatePicker} Component.
* @xtype datemenu
*/
Ext.menu.DateMenu = Ext.extend(Ext.menu.Menu, {
/**
* @cfg {Boolean} enableScrolling
* @hide
*/
enableScrolling: false,
/**
* @cfg {Number} maxHeight
* @hide
*/
/**
* @cfg {Number} scrollIncrement
* @hide
*/
/**
* @property picker
* @type DatePicker
* The {@link Ext.DatePicker} instance for this DateMenu
*/
cls: 'x-date-menu',
initComponent: function(){
this.on('beforeshow', this.onBeforeShow, this);
if(this.strict = (Ext.isIE7 && Ext.isStrict)){
this.on('show', this.onShow, this, {single: true, delay: 20});
}
Ext.apply(this, {
plain: true,
showSeparator: false,
items: this.picker = new Ext.DatePicker(Ext.apply({
internalRender: this.strict || !Ext.isIE,
ctCls: 'x-menu-date-item'
}, this.initialConfig))
});
Ext.menu.DateMenu.superclass.initComponent.call(this);
this.relayEvents(this.picker, ["select"]);
},
onClick: function() {
if(this.hideOnClick){
this.hide(true);
}
},
onBeforeShow: function(){
if (this.picker){
this.picker.hideMonthPicker(true);
}
},
onShow: function(){
var el = this.picker.getEl();
el.setWidth(el.getWidth()); //nasty hack for IE7 strict mode
}
});
Ext.reg('datemenu', Ext.menu.DateMenu);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -