init repo
This commit is contained in:
166
OfficeWeb/3rdparty/extjs/src/menu/CheckItem.js
vendored
Normal file
166
OfficeWeb/3rdparty/extjs/src/menu/CheckItem.js
vendored
Normal file
@@ -0,0 +1,166 @@
|
||||
/*
|
||||
|
||||
This file is part of Ext JS 4
|
||||
|
||||
Copyright (c) 2011 Sencha Inc
|
||||
|
||||
Contact: http://www.sencha.com/contact
|
||||
|
||||
GNU General Public License Usage
|
||||
This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file. Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
|
||||
If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact.
|
||||
|
||||
*/
|
||||
/**
|
||||
* A menu item that contains a togglable checkbox by default, but that can also be a part of a radio group.
|
||||
*
|
||||
* @example
|
||||
* Ext.create('Ext.menu.Menu', {
|
||||
* width: 100,
|
||||
* height: 110,
|
||||
* floating: false, // usually you want this set to True (default)
|
||||
* renderTo: Ext.getBody(), // usually rendered by it's containing component
|
||||
* items: [{
|
||||
* xtype: 'menucheckitem',
|
||||
* text: 'select all'
|
||||
* },{
|
||||
* xtype: 'menucheckitem',
|
||||
* text: 'select specific',
|
||||
* },{
|
||||
* iconCls: 'add16',
|
||||
* text: 'icon item'
|
||||
* },{
|
||||
* text: 'regular item'
|
||||
* }]
|
||||
* });
|
||||
*/
|
||||
Ext.define('Ext.menu.CheckItem', {
|
||||
extend: 'Ext.menu.Item',
|
||||
alias: 'widget.menucheckitem',
|
||||
|
||||
/**
|
||||
* @cfg {String} checkedCls
|
||||
* The CSS class used by {@link #cls} to show the checked state.
|
||||
* Defaults to `Ext.baseCSSPrefix + 'menu-item-checked'`.
|
||||
*/
|
||||
checkedCls: Ext.baseCSSPrefix + 'menu-item-checked',
|
||||
/**
|
||||
* @cfg {String} uncheckedCls
|
||||
* The CSS class used by {@link #cls} to show the unchecked state.
|
||||
* Defaults to `Ext.baseCSSPrefix + 'menu-item-unchecked'`.
|
||||
*/
|
||||
uncheckedCls: Ext.baseCSSPrefix + 'menu-item-unchecked',
|
||||
/**
|
||||
* @cfg {String} groupCls
|
||||
* The CSS class applied to this item's icon image to denote being a part of a radio group.
|
||||
* Defaults to `Ext.baseCSSClass + 'menu-group-icon'`.
|
||||
* Any specified {@link #iconCls} overrides this.
|
||||
*/
|
||||
groupCls: Ext.baseCSSPrefix + 'menu-group-icon',
|
||||
|
||||
/**
|
||||
* @cfg {Boolean} hideOnClick
|
||||
* Whether to not to hide the owning menu when this item is clicked.
|
||||
* Defaults to `false` for checkbox items, and to `true` for radio group items.
|
||||
*/
|
||||
hideOnClick: false,
|
||||
|
||||
afterRender: function() {
|
||||
var me = this;
|
||||
this.callParent();
|
||||
me.checked = !me.checked;
|
||||
me.setChecked(!me.checked, true);
|
||||
},
|
||||
|
||||
initComponent: function() {
|
||||
var me = this;
|
||||
me.addEvents(
|
||||
/**
|
||||
* @event beforecheckchange
|
||||
* Fires before a change event. Return false to cancel.
|
||||
* @param {Ext.menu.CheckItem} this
|
||||
* @param {Boolean} checked
|
||||
*/
|
||||
'beforecheckchange',
|
||||
|
||||
/**
|
||||
* @event checkchange
|
||||
* Fires after a change event.
|
||||
* @param {Ext.menu.CheckItem} this
|
||||
* @param {Boolean} checked
|
||||
*/
|
||||
'checkchange'
|
||||
);
|
||||
|
||||
me.callParent(arguments);
|
||||
|
||||
Ext.menu.Manager.registerCheckable(me);
|
||||
|
||||
if (me.group) {
|
||||
if (!me.iconCls) {
|
||||
me.iconCls = me.groupCls;
|
||||
}
|
||||
if (me.initialConfig.hideOnClick !== false) {
|
||||
me.hideOnClick = true;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Disables just the checkbox functionality of this menu Item. If this menu item has a submenu, that submenu
|
||||
* will still be accessible
|
||||
*/
|
||||
disableCheckChange: function() {
|
||||
var me = this;
|
||||
|
||||
if (me.iconEl) {
|
||||
me.iconEl.addCls(me.disabledCls);
|
||||
}
|
||||
me.checkChangeDisabled = true;
|
||||
},
|
||||
|
||||
/**
|
||||
* Reenables the checkbox functionality of this menu item after having been disabled by {@link #disableCheckChange}
|
||||
*/
|
||||
enableCheckChange: function() {
|
||||
var me = this;
|
||||
|
||||
me.iconEl.removeCls(me.disabledCls);
|
||||
me.checkChangeDisabled = false;
|
||||
},
|
||||
|
||||
onClick: function(e) {
|
||||
var me = this;
|
||||
if(!me.disabled && !me.checkChangeDisabled && !(me.checked && me.group)) {
|
||||
me.setChecked(!me.checked);
|
||||
}
|
||||
this.callParent([e]);
|
||||
},
|
||||
|
||||
onDestroy: function() {
|
||||
Ext.menu.Manager.unregisterCheckable(this);
|
||||
this.callParent(arguments);
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the checked state of the item
|
||||
* @param {Boolean} checked True to check, false to uncheck
|
||||
* @param {Boolean} suppressEvents (optional) True to prevent firing the checkchange events. Defaults to `false`.
|
||||
*/
|
||||
setChecked: function(checked, suppressEvents) {
|
||||
var me = this;
|
||||
if (me.checked !== checked && (suppressEvents || me.fireEvent('beforecheckchange', me, checked) !== false)) {
|
||||
if (me.el) {
|
||||
me.el[checked ? 'addCls' : 'removeCls'](me.checkedCls)[!checked ? 'addCls' : 'removeCls'](me.uncheckedCls);
|
||||
}
|
||||
me.checked = checked;
|
||||
Ext.menu.Manager.onCheckChange(me, checked);
|
||||
if (!suppressEvents) {
|
||||
Ext.callback(me.checkHandler, me.scope, [me, checked]);
|
||||
me.fireEvent('checkchange', me, checked);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
129
OfficeWeb/3rdparty/extjs/src/menu/ColorPicker.js
vendored
Normal file
129
OfficeWeb/3rdparty/extjs/src/menu/ColorPicker.js
vendored
Normal file
@@ -0,0 +1,129 @@
|
||||
/*
|
||||
|
||||
This file is part of Ext JS 4
|
||||
|
||||
Copyright (c) 2011 Sencha Inc
|
||||
|
||||
Contact: http://www.sencha.com/contact
|
||||
|
||||
GNU General Public License Usage
|
||||
This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file. Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
|
||||
If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact.
|
||||
|
||||
*/
|
||||
/**
|
||||
* A menu containing a Ext.picker.Color Component.
|
||||
*
|
||||
* Notes:
|
||||
*
|
||||
* - Although not listed here, the **constructor** for this class accepts all of the
|
||||
* configuration options of {@link Ext.picker.Color}.
|
||||
* - If subclassing ColorMenu, any configuration options for the ColorPicker must be
|
||||
* applied to the **initialConfig** property of the ColorMenu. Applying
|
||||
* {@link Ext.picker.Color ColorPicker} configuration settings to `this` will **not**
|
||||
* affect the ColorPicker's configuration.
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* @example
|
||||
* var colorPicker = Ext.create('Ext.menu.ColorPicker', {
|
||||
* value: '000000'
|
||||
* });
|
||||
*
|
||||
* Ext.create('Ext.menu.Menu', {
|
||||
* width: 100,
|
||||
* height: 90,
|
||||
* floating: false, // usually you want this set to True (default)
|
||||
* renderTo: Ext.getBody(), // usually rendered by it's containing component
|
||||
* items: [{
|
||||
* text: 'choose a color',
|
||||
* menu: colorPicker
|
||||
* },{
|
||||
* iconCls: 'add16',
|
||||
* text: 'icon item'
|
||||
* },{
|
||||
* text: 'regular item'
|
||||
* }]
|
||||
* });
|
||||
*/
|
||||
Ext.define('Ext.menu.ColorPicker', {
|
||||
extend: 'Ext.menu.Menu',
|
||||
|
||||
alias: 'widget.colormenu',
|
||||
|
||||
requires: [
|
||||
'Ext.picker.Color'
|
||||
],
|
||||
|
||||
/**
|
||||
* @cfg {Boolean} hideOnClick
|
||||
* False to continue showing the menu after a date is selected.
|
||||
*/
|
||||
hideOnClick : true,
|
||||
|
||||
/**
|
||||
* @cfg {String} pickerId
|
||||
* An id to assign to the underlying color picker.
|
||||
*/
|
||||
pickerId : null,
|
||||
|
||||
/**
|
||||
* @cfg {Number} maxHeight
|
||||
* @hide
|
||||
*/
|
||||
|
||||
/**
|
||||
* @property {Ext.picker.Color} picker
|
||||
* The {@link Ext.picker.Color} instance for this ColorMenu
|
||||
*/
|
||||
|
||||
/**
|
||||
* @event click
|
||||
* @hide
|
||||
*/
|
||||
|
||||
/**
|
||||
* @event itemclick
|
||||
* @hide
|
||||
*/
|
||||
|
||||
initComponent : function(){
|
||||
var me = this,
|
||||
cfg = Ext.apply({}, me.initialConfig);
|
||||
|
||||
// Ensure we don't get duplicate listeners
|
||||
delete cfg.listeners;
|
||||
Ext.apply(me, {
|
||||
plain: true,
|
||||
showSeparator: false,
|
||||
items: Ext.applyIf({
|
||||
cls: Ext.baseCSSPrefix + 'menu-color-item',
|
||||
id: me.pickerId,
|
||||
xtype: 'colorpicker'
|
||||
}, cfg)
|
||||
});
|
||||
|
||||
me.callParent(arguments);
|
||||
|
||||
me.picker = me.down('colorpicker');
|
||||
|
||||
/**
|
||||
* @event select
|
||||
* @alias Ext.picker.Color#select
|
||||
*/
|
||||
me.relayEvents(me.picker, ['select']);
|
||||
|
||||
if (me.hideOnClick) {
|
||||
me.on('select', me.hidePickerOnSelect, me);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Hides picker on select if hideOnClick is true
|
||||
* @private
|
||||
*/
|
||||
hidePickerOnSelect: function() {
|
||||
Ext.menu.Manager.hideAll();
|
||||
}
|
||||
});
|
||||
124
OfficeWeb/3rdparty/extjs/src/menu/DatePicker.js
vendored
Normal file
124
OfficeWeb/3rdparty/extjs/src/menu/DatePicker.js
vendored
Normal file
@@ -0,0 +1,124 @@
|
||||
/*
|
||||
|
||||
This file is part of Ext JS 4
|
||||
|
||||
Copyright (c) 2011 Sencha Inc
|
||||
|
||||
Contact: http://www.sencha.com/contact
|
||||
|
||||
GNU General Public License Usage
|
||||
This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file. Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
|
||||
If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact.
|
||||
|
||||
*/
|
||||
/**
|
||||
* A menu containing an Ext.picker.Date Component.
|
||||
*
|
||||
* Notes:
|
||||
*
|
||||
* - Although not listed here, the **constructor** for this class accepts all of the
|
||||
* configuration options of **{@link Ext.picker.Date}**.
|
||||
* - If subclassing DateMenu, any configuration options for the DatePicker must be applied
|
||||
* to the **initialConfig** property of the DateMenu. Applying {@link Ext.picker.Date Date Picker}
|
||||
* configuration settings to **this** will **not** affect the Date Picker's configuration.
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* @example
|
||||
* var dateMenu = Ext.create('Ext.menu.DatePicker', {
|
||||
* handler: function(dp, date){
|
||||
* Ext.Msg.alert('Date Selected', 'You selected ' + Ext.Date.format(date, 'M j, Y'));
|
||||
* }
|
||||
* });
|
||||
*
|
||||
* Ext.create('Ext.menu.Menu', {
|
||||
* width: 100,
|
||||
* height: 90,
|
||||
* floating: false, // usually you want this set to True (default)
|
||||
* renderTo: Ext.getBody(), // usually rendered by it's containing component
|
||||
* items: [{
|
||||
* text: 'choose a date',
|
||||
* menu: dateMenu
|
||||
* },{
|
||||
* iconCls: 'add16',
|
||||
* text: 'icon item'
|
||||
* },{
|
||||
* text: 'regular item'
|
||||
* }]
|
||||
* });
|
||||
*/
|
||||
Ext.define('Ext.menu.DatePicker', {
|
||||
extend: 'Ext.menu.Menu',
|
||||
|
||||
alias: 'widget.datemenu',
|
||||
|
||||
requires: [
|
||||
'Ext.picker.Date'
|
||||
],
|
||||
|
||||
/**
|
||||
* @cfg {Boolean} hideOnClick
|
||||
* False to continue showing the menu after a date is selected.
|
||||
*/
|
||||
hideOnClick : true,
|
||||
|
||||
/**
|
||||
* @cfg {String} pickerId
|
||||
* An id to assign to the underlying date picker.
|
||||
*/
|
||||
pickerId : null,
|
||||
|
||||
/**
|
||||
* @cfg {Number} maxHeight
|
||||
* @hide
|
||||
*/
|
||||
|
||||
/**
|
||||
* @property {Ext.picker.Date} picker
|
||||
* The {@link Ext.picker.Date} instance for this DateMenu
|
||||
*/
|
||||
|
||||
/**
|
||||
* @event click
|
||||
* @hide
|
||||
*/
|
||||
|
||||
/**
|
||||
* @event itemclick
|
||||
* @hide
|
||||
*/
|
||||
|
||||
initComponent : function(){
|
||||
var me = this;
|
||||
|
||||
Ext.apply(me, {
|
||||
showSeparator: false,
|
||||
plain: true,
|
||||
border: false,
|
||||
bodyPadding: 0, // remove the body padding from the datepicker menu item so it looks like 3.3
|
||||
items: Ext.applyIf({
|
||||
cls: Ext.baseCSSPrefix + 'menu-date-item',
|
||||
id: me.pickerId,
|
||||
xtype: 'datepicker'
|
||||
}, me.initialConfig)
|
||||
});
|
||||
|
||||
me.callParent(arguments);
|
||||
|
||||
me.picker = me.down('datepicker');
|
||||
/**
|
||||
* @event select
|
||||
* @alias Ext.picker.Date#select
|
||||
*/
|
||||
me.relayEvents(me.picker, ['select']);
|
||||
|
||||
if (me.hideOnClick) {
|
||||
me.on('select', me.hidePickerOnSelect, me);
|
||||
}
|
||||
},
|
||||
|
||||
hidePickerOnSelect: function() {
|
||||
Ext.menu.Manager.hideAll();
|
||||
}
|
||||
});
|
||||
422
OfficeWeb/3rdparty/extjs/src/menu/Item.js
vendored
Normal file
422
OfficeWeb/3rdparty/extjs/src/menu/Item.js
vendored
Normal file
@@ -0,0 +1,422 @@
|
||||
/*
|
||||
|
||||
This file is part of Ext JS 4
|
||||
|
||||
Copyright (c) 2011 Sencha Inc
|
||||
|
||||
Contact: http://www.sencha.com/contact
|
||||
|
||||
GNU General Public License Usage
|
||||
This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file. Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
|
||||
If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact.
|
||||
|
||||
*/
|
||||
/**
|
||||
* A base class for all menu items that require menu-related functionality such as click handling,
|
||||
* sub-menus, icons, etc.
|
||||
*
|
||||
* @example
|
||||
* Ext.create('Ext.menu.Menu', {
|
||||
* width: 100,
|
||||
* height: 100,
|
||||
* floating: false, // usually you want this set to True (default)
|
||||
* renderTo: Ext.getBody(), // usually rendered by it's containing component
|
||||
* items: [{
|
||||
* text: 'icon item',
|
||||
* iconCls: 'add16'
|
||||
* },{
|
||||
* text: 'text item'
|
||||
* },{
|
||||
* text: 'plain item',
|
||||
* plain: true
|
||||
* }]
|
||||
* });
|
||||
*/
|
||||
Ext.define('Ext.menu.Item', {
|
||||
extend: 'Ext.Component',
|
||||
alias: 'widget.menuitem',
|
||||
alternateClassName: 'Ext.menu.TextItem',
|
||||
|
||||
/**
|
||||
* @property {Boolean} activated
|
||||
* Whether or not this item is currently activated
|
||||
*/
|
||||
|
||||
/**
|
||||
* @property {Ext.menu.Menu} parentMenu
|
||||
* The parent Menu of this item.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @cfg {String} activeCls
|
||||
* The CSS class added to the menu item when the item is activated (focused/mouseover).
|
||||
* Defaults to `Ext.baseCSSPrefix + 'menu-item-active'`.
|
||||
*/
|
||||
activeCls: Ext.baseCSSPrefix + 'menu-item-active',
|
||||
|
||||
/**
|
||||
* @cfg {String} ariaRole @hide
|
||||
*/
|
||||
ariaRole: 'menuitem',
|
||||
|
||||
/**
|
||||
* @cfg {Boolean} canActivate
|
||||
* Whether or not this menu item can be activated when focused/mouseovered. Defaults to `true`.
|
||||
*/
|
||||
canActivate: true,
|
||||
|
||||
/**
|
||||
* @cfg {Number} clickHideDelay
|
||||
* The delay in milliseconds to wait before hiding the menu after clicking the menu item.
|
||||
* This only has an effect when `hideOnClick: true`. Defaults to `1`.
|
||||
*/
|
||||
clickHideDelay: 1,
|
||||
|
||||
/**
|
||||
* @cfg {Boolean} destroyMenu
|
||||
* Whether or not to destroy any associated sub-menu when this item is destroyed. Defaults to `true`.
|
||||
*/
|
||||
destroyMenu: true,
|
||||
|
||||
/**
|
||||
* @cfg {String} disabledCls
|
||||
* The CSS class added to the menu item when the item is disabled.
|
||||
* Defaults to `Ext.baseCSSPrefix + 'menu-item-disabled'`.
|
||||
*/
|
||||
disabledCls: Ext.baseCSSPrefix + 'menu-item-disabled',
|
||||
|
||||
/**
|
||||
* @cfg {String} href
|
||||
* The href attribute to use for the underlying anchor link. Defaults to `#`.
|
||||
* @markdown
|
||||
*/
|
||||
|
||||
/**
|
||||
* @cfg {String} hrefTarget
|
||||
* The target attribute to use for the underlying anchor link. Defaults to `undefined`.
|
||||
* @markdown
|
||||
*/
|
||||
|
||||
/**
|
||||
* @cfg {Boolean} hideOnClick
|
||||
* Whether to not to hide the owning menu when this item is clicked. Defaults to `true`.
|
||||
* @markdown
|
||||
*/
|
||||
hideOnClick: true,
|
||||
|
||||
/**
|
||||
* @cfg {String} icon
|
||||
* The path to an icon to display in this item. Defaults to `Ext.BLANK_IMAGE_URL`.
|
||||
* @markdown
|
||||
*/
|
||||
|
||||
/**
|
||||
* @cfg {String} iconCls
|
||||
* A CSS class that specifies a `background-image` to use as the icon for this item. Defaults to `undefined`.
|
||||
* @markdown
|
||||
*/
|
||||
|
||||
isMenuItem: true,
|
||||
|
||||
/**
|
||||
* @cfg {Mixed} menu
|
||||
* Either an instance of {@link Ext.menu.Menu} or a config object for an {@link Ext.menu.Menu}
|
||||
* which will act as a sub-menu to this item.
|
||||
* @markdown
|
||||
* @property {Ext.menu.Menu} menu The sub-menu associated with this item, if one was configured.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @cfg {String} menuAlign
|
||||
* The default {@link Ext.Element#getAlignToXY Ext.Element.getAlignToXY} anchor position value for this
|
||||
* item's sub-menu relative to this item's position. Defaults to `'tl-tr?'`.
|
||||
* @markdown
|
||||
*/
|
||||
menuAlign: 'tl-tr?',
|
||||
|
||||
/**
|
||||
* @cfg {Number} menuExpandDelay
|
||||
* The delay in milliseconds before this item's sub-menu expands after this item is moused over. Defaults to `200`.
|
||||
* @markdown
|
||||
*/
|
||||
menuExpandDelay: 200,
|
||||
|
||||
/**
|
||||
* @cfg {Number} menuHideDelay
|
||||
* The delay in milliseconds before this item's sub-menu hides after this item is moused out. Defaults to `200`.
|
||||
* @markdown
|
||||
*/
|
||||
menuHideDelay: 200,
|
||||
|
||||
/**
|
||||
* @cfg {Boolean} plain
|
||||
* Whether or not this item is plain text/html with no icon or visual activation. Defaults to `false`.
|
||||
* @markdown
|
||||
*/
|
||||
|
||||
renderTpl: [
|
||||
'<tpl if="plain">',
|
||||
'{text}',
|
||||
'</tpl>',
|
||||
'<tpl if="!plain">',
|
||||
'<a id="{id}-itemEl" class="' + Ext.baseCSSPrefix + 'menu-item-link" href="{href}" <tpl if="hrefTarget">target="{hrefTarget}"</tpl> hidefocus="true" unselectable="on">',
|
||||
'<img id="{id}-iconEl" src="{icon}" class="' + Ext.baseCSSPrefix + 'menu-item-icon {iconCls}" />',
|
||||
'<span id="{id}-textEl" class="' + Ext.baseCSSPrefix + 'menu-item-text" <tpl if="menu">style="margin-right: 17px;"</tpl> >{text}</span>',
|
||||
'<tpl if="menu">',
|
||||
'<img id="{id}-arrowEl" src="{blank}" class="' + Ext.baseCSSPrefix + 'menu-item-arrow" />',
|
||||
'</tpl>',
|
||||
'</a>',
|
||||
'</tpl>'
|
||||
],
|
||||
|
||||
maskOnDisable: false,
|
||||
|
||||
/**
|
||||
* @cfg {String} text
|
||||
* The text/html to display in this item. Defaults to `undefined`.
|
||||
* @markdown
|
||||
*/
|
||||
|
||||
activate: function() {
|
||||
var me = this;
|
||||
|
||||
if (!me.activated && me.canActivate && me.rendered && !me.isDisabled() && me.isVisible()) {
|
||||
me.el.addCls(me.activeCls);
|
||||
me.focus();
|
||||
me.activated = true;
|
||||
me.fireEvent('activate', me);
|
||||
}
|
||||
},
|
||||
|
||||
blur: function() {
|
||||
this.$focused = false;
|
||||
this.callParent(arguments);
|
||||
},
|
||||
|
||||
deactivate: function() {
|
||||
var me = this;
|
||||
|
||||
if (me.activated) {
|
||||
me.el.removeCls(me.activeCls);
|
||||
me.blur();
|
||||
me.hideMenu();
|
||||
me.activated = false;
|
||||
me.fireEvent('deactivate', me);
|
||||
}
|
||||
},
|
||||
|
||||
deferExpandMenu: function() {
|
||||
var me = this;
|
||||
|
||||
if (!me.menu.rendered || !me.menu.isVisible()) {
|
||||
me.parentMenu.activeChild = me.menu;
|
||||
me.menu.parentItem = me;
|
||||
me.menu.parentMenu = me.menu.ownerCt = me.parentMenu;
|
||||
me.menu.showBy(me, me.menuAlign);
|
||||
}
|
||||
},
|
||||
|
||||
deferHideMenu: function() {
|
||||
if (this.menu.isVisible()) {
|
||||
this.menu.hide();
|
||||
}
|
||||
},
|
||||
|
||||
deferHideParentMenus: function() {
|
||||
Ext.menu.Manager.hideAll();
|
||||
},
|
||||
|
||||
expandMenu: function(delay) {
|
||||
var me = this;
|
||||
|
||||
if (me.menu) {
|
||||
clearTimeout(me.hideMenuTimer);
|
||||
if (delay === 0) {
|
||||
me.deferExpandMenu();
|
||||
} else {
|
||||
me.expandMenuTimer = Ext.defer(me.deferExpandMenu, Ext.isNumber(delay) ? delay : me.menuExpandDelay, me);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
focus: function() {
|
||||
this.$focused = true;
|
||||
this.callParent(arguments);
|
||||
},
|
||||
|
||||
getRefItems: function(deep){
|
||||
var menu = this.menu,
|
||||
items;
|
||||
|
||||
if (menu) {
|
||||
items = menu.getRefItems(deep);
|
||||
items.unshift(menu);
|
||||
}
|
||||
return items || [];
|
||||
},
|
||||
|
||||
hideMenu: function(delay) {
|
||||
var me = this;
|
||||
|
||||
if (me.menu) {
|
||||
clearTimeout(me.expandMenuTimer);
|
||||
me.hideMenuTimer = Ext.defer(me.deferHideMenu, Ext.isNumber(delay) ? delay : me.menuHideDelay, me);
|
||||
}
|
||||
},
|
||||
|
||||
initComponent: function() {
|
||||
var me = this,
|
||||
prefix = Ext.baseCSSPrefix,
|
||||
cls = [prefix + 'menu-item'];
|
||||
|
||||
me.addEvents(
|
||||
/**
|
||||
* @event activate
|
||||
* Fires when this item is activated
|
||||
* @param {Ext.menu.Item} item The activated item
|
||||
*/
|
||||
'activate',
|
||||
|
||||
/**
|
||||
* @event click
|
||||
* Fires when this item is clicked
|
||||
* @param {Ext.menu.Item} item The item that was clicked
|
||||
* @param {Ext.EventObject} e The underyling {@link Ext.EventObject}.
|
||||
*/
|
||||
'click',
|
||||
|
||||
/**
|
||||
* @event deactivate
|
||||
* Fires when this tiem is deactivated
|
||||
* @param {Ext.menu.Item} item The deactivated item
|
||||
*/
|
||||
'deactivate'
|
||||
);
|
||||
|
||||
if (me.plain) {
|
||||
cls.push(prefix + 'menu-item-plain');
|
||||
}
|
||||
|
||||
if (me.cls) {
|
||||
cls.push(me.cls);
|
||||
}
|
||||
|
||||
me.cls = cls.join(' ');
|
||||
|
||||
if (me.menu) {
|
||||
me.menu = Ext.menu.Manager.get(me.menu);
|
||||
}
|
||||
|
||||
me.callParent(arguments);
|
||||
},
|
||||
|
||||
onClick: function(e) {
|
||||
var me = this;
|
||||
|
||||
if (!me.href) {
|
||||
e.stopEvent();
|
||||
}
|
||||
|
||||
if (me.disabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (me.hideOnClick) {
|
||||
me.deferHideParentMenusTimer = Ext.defer(me.deferHideParentMenus, me.clickHideDelay, me);
|
||||
}
|
||||
|
||||
Ext.callback(me.handler, me.scope || me, [me, e]);
|
||||
me.fireEvent('click', me, e);
|
||||
|
||||
if (!me.hideOnClick) {
|
||||
me.focus();
|
||||
}
|
||||
},
|
||||
|
||||
onDestroy: function() {
|
||||
var me = this;
|
||||
|
||||
clearTimeout(me.expandMenuTimer);
|
||||
clearTimeout(me.hideMenuTimer);
|
||||
clearTimeout(me.deferHideParentMenusTimer);
|
||||
|
||||
if (me.menu) {
|
||||
delete me.menu.parentItem;
|
||||
delete me.menu.parentMenu;
|
||||
delete me.menu.ownerCt;
|
||||
if (me.destroyMenu !== false) {
|
||||
me.menu.destroy();
|
||||
}
|
||||
}
|
||||
me.callParent(arguments);
|
||||
},
|
||||
|
||||
onRender: function(ct, pos) {
|
||||
var me = this,
|
||||
blank = Ext.BLANK_IMAGE_URL;
|
||||
|
||||
Ext.applyIf(me.renderData, {
|
||||
href: me.href || '#',
|
||||
hrefTarget: me.hrefTarget,
|
||||
icon: me.icon || blank,
|
||||
iconCls: me.iconCls + (me.checkChangeDisabled ? ' ' + me.disabledCls : ''),
|
||||
menu: Ext.isDefined(me.menu),
|
||||
plain: me.plain,
|
||||
text: me.text,
|
||||
blank: blank
|
||||
});
|
||||
|
||||
me.addChildEls('itemEl', 'iconEl', 'textEl', 'arrowEl');
|
||||
|
||||
me.callParent(arguments);
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the {@link #click} handler of this item
|
||||
* @param {Function} fn The handler function
|
||||
* @param {Object} scope (optional) The scope of the handler function
|
||||
*/
|
||||
setHandler: function(fn, scope) {
|
||||
this.handler = fn || null;
|
||||
this.scope = scope;
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the {@link #iconCls} of this item
|
||||
* @param {String} iconCls The CSS class to set to {@link #iconCls}
|
||||
*/
|
||||
setIconCls: function(iconCls) {
|
||||
var me = this;
|
||||
|
||||
if (me.iconEl) {
|
||||
if (me.iconCls) {
|
||||
me.iconEl.removeCls(me.iconCls);
|
||||
}
|
||||
|
||||
if (iconCls) {
|
||||
me.iconEl.addCls(iconCls);
|
||||
}
|
||||
}
|
||||
|
||||
me.iconCls = iconCls;
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the {@link #text} of this item
|
||||
* @param {String} text The {@link #text}
|
||||
*/
|
||||
setText: function(text) {
|
||||
var me = this,
|
||||
el = me.textEl || me.el;
|
||||
|
||||
me.text = text;
|
||||
|
||||
if (me.rendered) {
|
||||
el.update(text || '');
|
||||
// cannot just call doComponentLayout due to stretchmax
|
||||
me.ownerCt.redoComponentLayout();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
148
OfficeWeb/3rdparty/extjs/src/menu/KeyNav.js
vendored
Normal file
148
OfficeWeb/3rdparty/extjs/src/menu/KeyNav.js
vendored
Normal file
@@ -0,0 +1,148 @@
|
||||
/*
|
||||
|
||||
This file is part of Ext JS 4
|
||||
|
||||
Copyright (c) 2011 Sencha Inc
|
||||
|
||||
Contact: http://www.sencha.com/contact
|
||||
|
||||
GNU General Public License Usage
|
||||
This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file. Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
|
||||
If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact.
|
||||
|
||||
*/
|
||||
/**
|
||||
* @class Ext.menu.KeyNav
|
||||
* @private
|
||||
*/
|
||||
Ext.define('Ext.menu.KeyNav', {
|
||||
extend: 'Ext.util.KeyNav',
|
||||
|
||||
requires: ['Ext.FocusManager'],
|
||||
|
||||
constructor: function(menu) {
|
||||
var me = this;
|
||||
|
||||
me.menu = menu;
|
||||
me.callParent([menu.el, {
|
||||
down: me.down,
|
||||
enter: me.enter,
|
||||
esc: me.escape,
|
||||
left: me.left,
|
||||
right: me.right,
|
||||
space: me.enter,
|
||||
tab: me.tab,
|
||||
up: me.up
|
||||
}]);
|
||||
},
|
||||
|
||||
down: function(e) {
|
||||
var me = this,
|
||||
fi = me.menu.focusedItem;
|
||||
|
||||
if (fi && e.getKey() == Ext.EventObject.DOWN && me.isWhitelisted(fi)) {
|
||||
return true;
|
||||
}
|
||||
me.focusNextItem(1);
|
||||
},
|
||||
|
||||
enter: function(e) {
|
||||
var menu = this.menu,
|
||||
focused = menu.focusedItem;
|
||||
|
||||
if (menu.activeItem) {
|
||||
menu.onClick(e);
|
||||
} else if (focused && focused.isFormField) {
|
||||
// prevent stopEvent being called
|
||||
return true;
|
||||
}
|
||||
},
|
||||
|
||||
escape: function(e) {
|
||||
Ext.menu.Manager.hideAll();
|
||||
},
|
||||
|
||||
focusNextItem: function(step) {
|
||||
var menu = this.menu,
|
||||
items = menu.items,
|
||||
focusedItem = menu.focusedItem,
|
||||
startIdx = focusedItem ? items.indexOf(focusedItem) : -1,
|
||||
idx = startIdx + step;
|
||||
|
||||
while (idx != startIdx) {
|
||||
if (idx < 0) {
|
||||
idx = items.length - 1;
|
||||
} else if (idx >= items.length) {
|
||||
idx = 0;
|
||||
}
|
||||
|
||||
var item = items.getAt(idx);
|
||||
if (menu.canActivateItem(item)) {
|
||||
menu.setActiveItem(item);
|
||||
break;
|
||||
}
|
||||
idx += step;
|
||||
}
|
||||
},
|
||||
|
||||
isWhitelisted: function(item) {
|
||||
return Ext.FocusManager.isWhitelisted(item);
|
||||
},
|
||||
|
||||
left: function(e) {
|
||||
var menu = this.menu,
|
||||
fi = menu.focusedItem,
|
||||
ai = menu.activeItem;
|
||||
|
||||
if (fi && this.isWhitelisted(fi)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
menu.hide();
|
||||
if (menu.parentMenu) {
|
||||
menu.parentMenu.focus();
|
||||
}
|
||||
},
|
||||
|
||||
right: function(e) {
|
||||
var menu = this.menu,
|
||||
fi = menu.focusedItem,
|
||||
ai = menu.activeItem,
|
||||
am;
|
||||
|
||||
if (fi && this.isWhitelisted(fi)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (ai) {
|
||||
am = menu.activeItem.menu;
|
||||
if (am) {
|
||||
ai.expandMenu(0);
|
||||
Ext.defer(function() {
|
||||
am.setActiveItem(am.items.getAt(0));
|
||||
}, 25);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
tab: function(e) {
|
||||
var me = this;
|
||||
|
||||
if (e.shiftKey) {
|
||||
me.up(e);
|
||||
} else {
|
||||
me.down(e);
|
||||
}
|
||||
},
|
||||
|
||||
up: function(e) {
|
||||
var me = this,
|
||||
fi = me.menu.focusedItem;
|
||||
|
||||
if (fi && e.getKey() == Ext.EventObject.UP && me.isWhitelisted(fi)) {
|
||||
return true;
|
||||
}
|
||||
me.focusNextItem(-1);
|
||||
}
|
||||
});
|
||||
231
OfficeWeb/3rdparty/extjs/src/menu/Manager.js
vendored
Normal file
231
OfficeWeb/3rdparty/extjs/src/menu/Manager.js
vendored
Normal file
@@ -0,0 +1,231 @@
|
||||
/*
|
||||
|
||||
This file is part of Ext JS 4
|
||||
|
||||
Copyright (c) 2011 Sencha Inc
|
||||
|
||||
Contact: http://www.sencha.com/contact
|
||||
|
||||
GNU General Public License Usage
|
||||
This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file. Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
|
||||
If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact.
|
||||
|
||||
*/
|
||||
/**
|
||||
* @class Ext.menu.Manager
|
||||
* Provides a common registry of all menus on a page.
|
||||
* @singleton
|
||||
*/
|
||||
Ext.define('Ext.menu.Manager', {
|
||||
singleton: true,
|
||||
requires: [
|
||||
'Ext.util.MixedCollection',
|
||||
'Ext.util.KeyMap'
|
||||
],
|
||||
alternateClassName: 'Ext.menu.MenuMgr',
|
||||
|
||||
uses: ['Ext.menu.Menu'],
|
||||
|
||||
menus: {},
|
||||
groups: {},
|
||||
attached: false,
|
||||
lastShow: new Date(),
|
||||
|
||||
init: function() {
|
||||
var me = this;
|
||||
|
||||
me.active = Ext.create('Ext.util.MixedCollection');
|
||||
Ext.getDoc().addKeyListener(27, function() {
|
||||
if (me.active.length > 0) {
|
||||
me.hideAll();
|
||||
}
|
||||
}, me);
|
||||
},
|
||||
|
||||
/**
|
||||
* Hides all menus that are currently visible
|
||||
* @return {Boolean} success True if any active menus were hidden.
|
||||
*/
|
||||
hideAll: function() {
|
||||
var active = this.active,
|
||||
c;
|
||||
if (active && active.length > 0) {
|
||||
c = active.clone();
|
||||
c.each(function(m) {
|
||||
m.hide();
|
||||
});
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
||||
onHide: function(m) {
|
||||
var me = this,
|
||||
active = me.active;
|
||||
active.remove(m);
|
||||
if (active.length < 1) {
|
||||
Ext.getDoc().un('mousedown', me.onMouseDown, me);
|
||||
me.attached = false;
|
||||
}
|
||||
},
|
||||
|
||||
onShow: function(m) {
|
||||
var me = this,
|
||||
active = me.active,
|
||||
last = active.last(),
|
||||
attached = me.attached,
|
||||
menuEl = m.getEl(),
|
||||
zIndex;
|
||||
|
||||
me.lastShow = new Date();
|
||||
active.add(m);
|
||||
if (!attached) {
|
||||
Ext.getDoc().on('mousedown', me.onMouseDown, me);
|
||||
me.attached = true;
|
||||
}
|
||||
m.toFront();
|
||||
},
|
||||
|
||||
onBeforeHide: function(m) {
|
||||
if (m.activeChild) {
|
||||
m.activeChild.hide();
|
||||
}
|
||||
if (m.autoHideTimer) {
|
||||
clearTimeout(m.autoHideTimer);
|
||||
delete m.autoHideTimer;
|
||||
}
|
||||
},
|
||||
|
||||
onBeforeShow: function(m) {
|
||||
var active = this.active,
|
||||
parentMenu = m.parentMenu;
|
||||
|
||||
active.remove(m);
|
||||
if (!parentMenu && !m.allowOtherMenus) {
|
||||
this.hideAll();
|
||||
}
|
||||
else if (parentMenu && parentMenu.activeChild && m != parentMenu.activeChild) {
|
||||
parentMenu.activeChild.hide();
|
||||
}
|
||||
},
|
||||
|
||||
// private
|
||||
onMouseDown: function(e) {
|
||||
var me = this,
|
||||
active = me.active,
|
||||
lastShow = me.lastShow,
|
||||
target = e.target;
|
||||
|
||||
if (Ext.Date.getElapsed(lastShow) > 50 && active.length > 0 && !e.getTarget('.' + Ext.baseCSSPrefix + 'menu')) {
|
||||
me.hideAll();
|
||||
// in IE, if we mousedown on a focusable element, the focus gets cancelled and the focus event is never
|
||||
// fired on the element, so we'll focus it here
|
||||
if (Ext.isIE && Ext.fly(target).focusable()) {
|
||||
target.focus();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// private
|
||||
register: function(menu) {
|
||||
var me = this;
|
||||
|
||||
if (!me.active) {
|
||||
me.init();
|
||||
}
|
||||
|
||||
if (menu.floating) {
|
||||
me.menus[menu.id] = menu;
|
||||
menu.on({
|
||||
beforehide: me.onBeforeHide,
|
||||
hide: me.onHide,
|
||||
beforeshow: me.onBeforeShow,
|
||||
show: me.onShow,
|
||||
scope: me
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns a {@link Ext.menu.Menu} object
|
||||
* @param {String/Object} menu The string menu id, an existing menu object reference, or a Menu config that will
|
||||
* be used to generate and return a new Menu this.
|
||||
* @return {Ext.menu.Menu} The specified menu, or null if none are found
|
||||
*/
|
||||
get: function(menu) {
|
||||
var menus = this.menus;
|
||||
|
||||
if (typeof menu == 'string') { // menu id
|
||||
if (!menus) { // not initialized, no menus to return
|
||||
return null;
|
||||
}
|
||||
return menus[menu];
|
||||
} else if (menu.isMenu) { // menu instance
|
||||
return menu;
|
||||
} else if (Ext.isArray(menu)) { // array of menu items
|
||||
return Ext.create('Ext.menu.Menu', {items:menu});
|
||||
} else { // otherwise, must be a config
|
||||
return Ext.ComponentManager.create(menu, 'menu');
|
||||
}
|
||||
},
|
||||
|
||||
// private
|
||||
unregister: function(menu) {
|
||||
var me = this,
|
||||
menus = me.menus,
|
||||
active = me.active;
|
||||
|
||||
delete menus[menu.id];
|
||||
active.remove(menu);
|
||||
menu.un({
|
||||
beforehide: me.onBeforeHide,
|
||||
hide: me.onHide,
|
||||
beforeshow: me.onBeforeShow,
|
||||
show: me.onShow,
|
||||
scope: me
|
||||
});
|
||||
},
|
||||
|
||||
// private
|
||||
registerCheckable: function(menuItem) {
|
||||
var groups = this.groups,
|
||||
groupId = menuItem.group;
|
||||
|
||||
if (groupId) {
|
||||
if (!groups[groupId]) {
|
||||
groups[groupId] = [];
|
||||
}
|
||||
|
||||
groups[groupId].push(menuItem);
|
||||
}
|
||||
},
|
||||
|
||||
// private
|
||||
unregisterCheckable: function(menuItem) {
|
||||
var groups = this.groups,
|
||||
groupId = menuItem.group;
|
||||
|
||||
if (groupId) {
|
||||
Ext.Array.remove(groups[groupId], menuItem);
|
||||
}
|
||||
},
|
||||
|
||||
onCheckChange: function(menuItem, state) {
|
||||
var groups = this.groups,
|
||||
groupId = menuItem.group,
|
||||
i = 0,
|
||||
group, ln, curr;
|
||||
|
||||
if (groupId && state) {
|
||||
group = groups[groupId];
|
||||
ln = group.length;
|
||||
for (; i < ln; i++) {
|
||||
curr = group[i];
|
||||
if (curr != menuItem) {
|
||||
curr.setChecked(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
652
OfficeWeb/3rdparty/extjs/src/menu/Menu.js
vendored
Normal file
652
OfficeWeb/3rdparty/extjs/src/menu/Menu.js
vendored
Normal file
@@ -0,0 +1,652 @@
|
||||
/*
|
||||
|
||||
This file is part of Ext JS 4
|
||||
|
||||
Copyright (c) 2011 Sencha Inc
|
||||
|
||||
Contact: http://www.sencha.com/contact
|
||||
|
||||
GNU General Public License Usage
|
||||
This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file. Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
|
||||
If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact.
|
||||
|
||||
*/
|
||||
/**
|
||||
* A menu object. This is the container to which you may add {@link Ext.menu.Item menu items}.
|
||||
*
|
||||
* Menus may contain either {@link Ext.menu.Item menu items}, or general {@link Ext.Component Components}.
|
||||
* Menus may also contain {@link Ext.panel.AbstractPanel#dockedItems docked items} because it extends {@link Ext.panel.Panel}.
|
||||
*
|
||||
* To make a contained general {@link Ext.Component Component} line up with other {@link Ext.menu.Item menu items},
|
||||
* specify `{@link Ext.menu.Item#plain plain}: true`. This reserves a space for an icon, and indents the Component
|
||||
* in line with the other menu items.
|
||||
*
|
||||
* By default, Menus are absolutely positioned, floating Components. By configuring a Menu with `{@link #floating}: false`,
|
||||
* a Menu may be used as a child of a {@link Ext.container.Container Container}.
|
||||
*
|
||||
* @example
|
||||
* Ext.create('Ext.menu.Menu', {
|
||||
* width: 100,
|
||||
* height: 100,
|
||||
* margin: '0 0 10 0',
|
||||
* floating: false, // usually you want this set to True (default)
|
||||
* renderTo: Ext.getBody(), // usually rendered by it's containing component
|
||||
* items: [{
|
||||
* text: 'regular item 1'
|
||||
* },{
|
||||
* text: 'regular item 2'
|
||||
* },{
|
||||
* text: 'regular item 3'
|
||||
* }]
|
||||
* });
|
||||
*
|
||||
* Ext.create('Ext.menu.Menu', {
|
||||
* width: 100,
|
||||
* height: 100,
|
||||
* plain: true,
|
||||
* floating: false, // usually you want this set to True (default)
|
||||
* renderTo: Ext.getBody(), // usually rendered by it's containing component
|
||||
* items: [{
|
||||
* text: 'plain item 1'
|
||||
* },{
|
||||
* text: 'plain item 2'
|
||||
* },{
|
||||
* text: 'plain item 3'
|
||||
* }]
|
||||
* });
|
||||
*/
|
||||
Ext.define('Ext.menu.Menu', {
|
||||
extend: 'Ext.panel.Panel',
|
||||
alias: 'widget.menu',
|
||||
requires: [
|
||||
'Ext.layout.container.Fit',
|
||||
'Ext.layout.container.VBox',
|
||||
'Ext.menu.CheckItem',
|
||||
'Ext.menu.Item',
|
||||
'Ext.menu.KeyNav',
|
||||
'Ext.menu.Manager',
|
||||
'Ext.menu.Separator'
|
||||
],
|
||||
|
||||
/**
|
||||
* @property {Ext.menu.Menu} parentMenu
|
||||
* The parent Menu of this Menu.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @cfg {Boolean} allowOtherMenus
|
||||
* True to allow multiple menus to be displayed at the same time.
|
||||
*/
|
||||
allowOtherMenus: false,
|
||||
|
||||
/**
|
||||
* @cfg {String} ariaRole @hide
|
||||
*/
|
||||
ariaRole: 'menu',
|
||||
|
||||
/**
|
||||
* @cfg {Boolean} autoRender @hide
|
||||
* floating is true, so autoRender always happens
|
||||
*/
|
||||
|
||||
/**
|
||||
* @cfg {String} defaultAlign
|
||||
* The default {@link Ext.Element#getAlignToXY Ext.Element#getAlignToXY} anchor position value for this menu
|
||||
* relative to its element of origin.
|
||||
*/
|
||||
defaultAlign: 'tl-bl?',
|
||||
|
||||
/**
|
||||
* @cfg {Boolean} floating
|
||||
* A Menu configured as `floating: true` (the default) will be rendered as an absolutely positioned,
|
||||
* {@link Ext.Component#floating floating} {@link Ext.Component Component}. If configured as `floating: false`, the Menu may be
|
||||
* used as a child item of another {@link Ext.container.Container Container}.
|
||||
*/
|
||||
floating: true,
|
||||
|
||||
/**
|
||||
* @cfg {Boolean} @hide
|
||||
* Menus are constrained to the document body by default
|
||||
*/
|
||||
constrain: true,
|
||||
|
||||
/**
|
||||
* @cfg {Boolean} [hidden=undefined]
|
||||
* True to initially render the Menu as hidden, requiring to be shown manually.
|
||||
*
|
||||
* Defaults to `true` when `floating: true`, and defaults to `false` when `floating: false`.
|
||||
*/
|
||||
hidden: true,
|
||||
|
||||
hideMode: 'visibility',
|
||||
|
||||
/**
|
||||
* @cfg {Boolean} ignoreParentClicks
|
||||
* True to ignore clicks on any item in this menu that is a parent item (displays a submenu)
|
||||
* so that the submenu is not dismissed when clicking the parent item.
|
||||
*/
|
||||
ignoreParentClicks: false,
|
||||
|
||||
isMenu: true,
|
||||
|
||||
/**
|
||||
* @cfg {String/Object} layout @hide
|
||||
*/
|
||||
|
||||
/**
|
||||
* @cfg {Boolean} showSeparator
|
||||
* True to show the icon separator.
|
||||
*/
|
||||
showSeparator : true,
|
||||
|
||||
/**
|
||||
* @cfg {Number} minWidth
|
||||
* The minimum width of the Menu.
|
||||
*/
|
||||
minWidth: 120,
|
||||
|
||||
/**
|
||||
* @cfg {Boolean} [plain=false]
|
||||
* True to remove the incised line down the left side of the menu and to not indent general Component items.
|
||||
*/
|
||||
|
||||
initComponent: function() {
|
||||
var me = this,
|
||||
prefix = Ext.baseCSSPrefix,
|
||||
cls = [prefix + 'menu'],
|
||||
bodyCls = me.bodyCls ? [me.bodyCls] : [];
|
||||
|
||||
me.addEvents(
|
||||
/**
|
||||
* @event click
|
||||
* Fires when this menu is clicked
|
||||
* @param {Ext.menu.Menu} menu The menu which has been clicked
|
||||
* @param {Ext.Component} item The menu item that was clicked. `undefined` if not applicable.
|
||||
* @param {Ext.EventObject} e The underlying {@link Ext.EventObject}.
|
||||
*/
|
||||
'click',
|
||||
|
||||
/**
|
||||
* @event mouseenter
|
||||
* Fires when the mouse enters this menu
|
||||
* @param {Ext.menu.Menu} menu The menu
|
||||
* @param {Ext.EventObject} e The underlying {@link Ext.EventObject}
|
||||
*/
|
||||
'mouseenter',
|
||||
|
||||
/**
|
||||
* @event mouseleave
|
||||
* Fires when the mouse leaves this menu
|
||||
* @param {Ext.menu.Menu} menu The menu
|
||||
* @param {Ext.EventObject} e The underlying {@link Ext.EventObject}
|
||||
*/
|
||||
'mouseleave',
|
||||
|
||||
/**
|
||||
* @event mouseover
|
||||
* Fires when the mouse is hovering over this menu
|
||||
* @param {Ext.menu.Menu} menu The menu
|
||||
* @param {Ext.Component} item The menu item that the mouse is over. `undefined` if not applicable.
|
||||
* @param {Ext.EventObject} e The underlying {@link Ext.EventObject}
|
||||
*/
|
||||
'mouseover'
|
||||
);
|
||||
|
||||
Ext.menu.Manager.register(me);
|
||||
|
||||
// Menu classes
|
||||
if (me.plain) {
|
||||
cls.push(prefix + 'menu-plain');
|
||||
}
|
||||
me.cls = cls.join(' ');
|
||||
|
||||
// Menu body classes
|
||||
bodyCls.unshift(prefix + 'menu-body');
|
||||
me.bodyCls = bodyCls.join(' ');
|
||||
|
||||
// Internal vbox layout, with scrolling overflow
|
||||
// Placed in initComponent (rather than prototype) in order to support dynamic layout/scroller
|
||||
// options if we wish to allow for such configurations on the Menu.
|
||||
// e.g., scrolling speed, vbox align stretch, etc.
|
||||
me.layout = {
|
||||
type: 'vbox',
|
||||
align: 'stretchmax',
|
||||
autoSize: true,
|
||||
clearInnerCtOnLayout: true,
|
||||
overflowHandler: 'Scroller'
|
||||
};
|
||||
|
||||
// hidden defaults to false if floating is configured as false
|
||||
if (me.floating === false && me.initialConfig.hidden !== true) {
|
||||
me.hidden = false;
|
||||
}
|
||||
|
||||
me.callParent(arguments);
|
||||
|
||||
me.on('beforeshow', function() {
|
||||
var hasItems = !!me.items.length;
|
||||
// FIXME: When a menu has its show cancelled because of no items, it
|
||||
// gets a visibility: hidden applied to it (instead of the default display: none)
|
||||
// Not sure why, but we remove this style when we want to show again.
|
||||
if (hasItems && me.rendered) {
|
||||
me.el.setStyle('visibility', null);
|
||||
}
|
||||
return hasItems;
|
||||
});
|
||||
},
|
||||
|
||||
afterRender: function(ct) {
|
||||
var me = this,
|
||||
prefix = Ext.baseCSSPrefix,
|
||||
space = ' ';
|
||||
|
||||
me.callParent(arguments);
|
||||
|
||||
// TODO: Move this to a subTemplate When we support them in the future
|
||||
if (me.showSeparator) {
|
||||
me.iconSepEl = me.layout.getRenderTarget().insertFirst({
|
||||
cls: prefix + 'menu-icon-separator',
|
||||
html: space
|
||||
});
|
||||
}
|
||||
|
||||
me.focusEl = me.el.createChild({
|
||||
cls: prefix + 'menu-focus',
|
||||
tabIndex: '-1',
|
||||
html: space
|
||||
});
|
||||
|
||||
me.mon(me.el, {
|
||||
click: me.onClick,
|
||||
mouseover: me.onMouseOver,
|
||||
scope: me
|
||||
});
|
||||
me.mouseMonitor = me.el.monitorMouseLeave(100, me.onMouseLeave, me);
|
||||
|
||||
if (me.showSeparator && ((!Ext.isStrict && Ext.isIE) || Ext.isIE6)) {
|
||||
me.iconSepEl.setHeight(me.el.getHeight());
|
||||
}
|
||||
|
||||
me.keyNav = Ext.create('Ext.menu.KeyNav', me);
|
||||
},
|
||||
|
||||
afterLayout: function() {
|
||||
var me = this;
|
||||
me.callParent(arguments);
|
||||
|
||||
// For IE6 & IE quirks, we have to resize the el and body since position: absolute
|
||||
// floating elements inherit their parent's width, making them the width of
|
||||
// document.body instead of the width of their contents.
|
||||
// This includes left/right dock items.
|
||||
if ((!Ext.isStrict && Ext.isIE) || Ext.isIE6) {
|
||||
var innerCt = me.layout.getRenderTarget(),
|
||||
innerCtWidth = 0,
|
||||
dis = me.dockedItems,
|
||||
l = dis.length,
|
||||
i = 0,
|
||||
di, clone, newWidth;
|
||||
|
||||
innerCtWidth = innerCt.getWidth();
|
||||
|
||||
newWidth = innerCtWidth + me.body.getBorderWidth('lr') + me.body.getPadding('lr');
|
||||
|
||||
// First set the body to the new width
|
||||
me.body.setWidth(newWidth);
|
||||
|
||||
// Now we calculate additional width (docked items) and set the el's width
|
||||
for (; i < l, di = dis.getAt(i); i++) {
|
||||
if (di.dock == 'left' || di.dock == 'right') {
|
||||
newWidth += di.getWidth();
|
||||
}
|
||||
}
|
||||
me.el.setWidth(newWidth);
|
||||
}
|
||||
},
|
||||
|
||||
getBubbleTarget: function(){
|
||||
return this.parentMenu || this.callParent();
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns whether a menu item can be activated or not.
|
||||
* @return {Boolean}
|
||||
*/
|
||||
canActivateItem: function(item) {
|
||||
return item && !item.isDisabled() && item.isVisible() && (item.canActivate || item.getXTypes().indexOf('menuitem') < 0);
|
||||
},
|
||||
|
||||
/**
|
||||
* Deactivates the current active item on the menu, if one exists.
|
||||
*/
|
||||
deactivateActiveItem: function() {
|
||||
var me = this;
|
||||
|
||||
if (me.activeItem) {
|
||||
me.activeItem.deactivate();
|
||||
if (!me.activeItem.activated) {
|
||||
delete me.activeItem;
|
||||
}
|
||||
}
|
||||
|
||||
// only blur if focusedItem is not a filter
|
||||
if (me.focusedItem && !me.filtered) {
|
||||
me.focusedItem.blur();
|
||||
if (!me.focusedItem.$focused) {
|
||||
delete me.focusedItem;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
clearStretch: function () {
|
||||
// the vbox/stretchmax will set the el sizes and subsequent layouts will not
|
||||
// reconsider them unless we clear the dimensions on the el's here:
|
||||
if (this.rendered) {
|
||||
this.items.each(function (item) {
|
||||
// each menuItem component needs to layout again, so clear its cache
|
||||
if (item.componentLayout) {
|
||||
delete item.componentLayout.lastComponentSize;
|
||||
}
|
||||
if (item.el) {
|
||||
item.el.setWidth(null);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
onAdd: function () {
|
||||
var me = this;
|
||||
|
||||
me.clearStretch();
|
||||
me.callParent(arguments);
|
||||
|
||||
if (Ext.isIE6 || Ext.isIE7) {
|
||||
// TODO - why does this need to be done (and not ok to do now)?
|
||||
Ext.Function.defer(me.doComponentLayout, 10, me);
|
||||
}
|
||||
},
|
||||
|
||||
onRemove: function () {
|
||||
this.clearStretch();
|
||||
this.callParent(arguments);
|
||||
|
||||
},
|
||||
|
||||
redoComponentLayout: function () {
|
||||
if (this.rendered) {
|
||||
this.clearStretch();
|
||||
this.doComponentLayout();
|
||||
}
|
||||
},
|
||||
|
||||
// inherit docs
|
||||
getFocusEl: function() {
|
||||
return this.focusEl;
|
||||
},
|
||||
|
||||
// inherit docs
|
||||
hide: function() {
|
||||
this.deactivateActiveItem();
|
||||
this.callParent(arguments);
|
||||
},
|
||||
|
||||
// private
|
||||
getItemFromEvent: function(e) {
|
||||
return this.getChildByElement(e.getTarget());
|
||||
},
|
||||
|
||||
lookupComponent: function(cmp) {
|
||||
var me = this;
|
||||
|
||||
if (Ext.isString(cmp)) {
|
||||
cmp = me.lookupItemFromString(cmp);
|
||||
} else if (Ext.isObject(cmp)) {
|
||||
cmp = me.lookupItemFromObject(cmp);
|
||||
}
|
||||
|
||||
// Apply our minWidth to all of our child components so it's accounted
|
||||
// for in our VBox layout
|
||||
cmp.minWidth = cmp.minWidth || me.minWidth;
|
||||
|
||||
return cmp;
|
||||
},
|
||||
|
||||
// private
|
||||
lookupItemFromObject: function(cmp) {
|
||||
var me = this,
|
||||
prefix = Ext.baseCSSPrefix,
|
||||
cls,
|
||||
intercept;
|
||||
|
||||
if (!cmp.isComponent) {
|
||||
if (!cmp.xtype) {
|
||||
cmp = Ext.create('Ext.menu.' + (Ext.isBoolean(cmp.checked) ? 'Check': '') + 'Item', cmp);
|
||||
} else {
|
||||
cmp = Ext.ComponentManager.create(cmp, cmp.xtype);
|
||||
}
|
||||
}
|
||||
|
||||
if (cmp.isMenuItem) {
|
||||
cmp.parentMenu = me;
|
||||
}
|
||||
|
||||
if (!cmp.isMenuItem && !cmp.dock) {
|
||||
cls = [prefix + 'menu-item', prefix + 'menu-item-cmp'];
|
||||
intercept = Ext.Function.createInterceptor;
|
||||
|
||||
// Wrap focus/blur to control component focus
|
||||
cmp.focus = intercept(cmp.focus, function() {
|
||||
this.$focused = true;
|
||||
}, cmp);
|
||||
cmp.blur = intercept(cmp.blur, function() {
|
||||
this.$focused = false;
|
||||
}, cmp);
|
||||
|
||||
if (!me.plain && (cmp.indent === true || cmp.iconCls === 'no-icon')) {
|
||||
cls.push(prefix + 'menu-item-indent');
|
||||
}
|
||||
|
||||
if (cmp.rendered) {
|
||||
cmp.el.addCls(cls);
|
||||
} else {
|
||||
cmp.cls = (cmp.cls ? cmp.cls : '') + ' ' + cls.join(' ');
|
||||
}
|
||||
cmp.isMenuItem = true;
|
||||
}
|
||||
return cmp;
|
||||
},
|
||||
|
||||
// private
|
||||
lookupItemFromString: function(cmp) {
|
||||
return (cmp == 'separator' || cmp == '-') ?
|
||||
Ext.createWidget('menuseparator')
|
||||
: Ext.createWidget('menuitem', {
|
||||
canActivate: false,
|
||||
hideOnClick: false,
|
||||
plain: true,
|
||||
text: cmp
|
||||
});
|
||||
},
|
||||
|
||||
onClick: function(e) {
|
||||
var me = this,
|
||||
item;
|
||||
|
||||
if (me.disabled) {
|
||||
e.stopEvent();
|
||||
return;
|
||||
}
|
||||
|
||||
if ((e.getTarget() == me.focusEl.dom) || e.within(me.layout.getRenderTarget())) {
|
||||
item = me.getItemFromEvent(e) || me.activeItem;
|
||||
|
||||
if (item) {
|
||||
if (item.getXTypes().indexOf('menuitem') >= 0) {
|
||||
if (!item.menu || !me.ignoreParentClicks) {
|
||||
item.onClick(e);
|
||||
} else {
|
||||
e.stopEvent();
|
||||
}
|
||||
}
|
||||
}
|
||||
me.fireEvent('click', me, item, e);
|
||||
}
|
||||
},
|
||||
|
||||
onDestroy: function() {
|
||||
var me = this;
|
||||
|
||||
Ext.menu.Manager.unregister(me);
|
||||
if (me.rendered) {
|
||||
me.el.un(me.mouseMonitor);
|
||||
me.keyNav.destroy();
|
||||
delete me.keyNav;
|
||||
}
|
||||
me.callParent(arguments);
|
||||
},
|
||||
|
||||
onMouseLeave: function(e) {
|
||||
var me = this;
|
||||
|
||||
me.deactivateActiveItem();
|
||||
|
||||
if (me.disabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
me.fireEvent('mouseleave', me, e);
|
||||
},
|
||||
|
||||
onMouseOver: function(e) {
|
||||
var me = this,
|
||||
fromEl = e.getRelatedTarget(),
|
||||
mouseEnter = !me.el.contains(fromEl),
|
||||
item = me.getItemFromEvent(e);
|
||||
|
||||
if (mouseEnter && me.parentMenu) {
|
||||
me.parentMenu.setActiveItem(me.parentItem);
|
||||
me.parentMenu.mouseMonitor.mouseenter();
|
||||
}
|
||||
|
||||
if (me.disabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (item) {
|
||||
me.setActiveItem(item);
|
||||
if (item.activated && item.expandMenu) {
|
||||
item.expandMenu();
|
||||
}
|
||||
}
|
||||
if (mouseEnter) {
|
||||
me.fireEvent('mouseenter', me, e);
|
||||
}
|
||||
me.fireEvent('mouseover', me, item, e);
|
||||
},
|
||||
|
||||
setActiveItem: function(item) {
|
||||
var me = this;
|
||||
|
||||
if (item && (item != me.activeItem && item != me.focusedItem)) {
|
||||
me.deactivateActiveItem();
|
||||
if (me.canActivateItem(item)) {
|
||||
if (item.activate) {
|
||||
item.activate();
|
||||
if (item.activated) {
|
||||
me.activeItem = item;
|
||||
me.focusedItem = item;
|
||||
me.focus();
|
||||
}
|
||||
} else {
|
||||
item.focus();
|
||||
me.focusedItem = item;
|
||||
}
|
||||
}
|
||||
item.el.scrollIntoView(me.layout.getRenderTarget());
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows the floating menu by the specified {@link Ext.Component Component} or {@link Ext.Element Element}.
|
||||
* @param {Ext.Component/Ext.Element} component The {@link Ext.Component} or {@link Ext.Element} to show the menu by.
|
||||
* @param {String} position (optional) Alignment position as used by {@link Ext.Element#getAlignToXY}.
|
||||
* Defaults to `{@link #defaultAlign}`.
|
||||
* @param {Number[]} offsets (optional) Alignment offsets as used by {@link Ext.Element#getAlignToXY}. Defaults to `undefined`.
|
||||
* @return {Ext.menu.Menu} This Menu.
|
||||
*/
|
||||
showBy: function(cmp, pos, off) {
|
||||
var me = this,
|
||||
xy,
|
||||
region;
|
||||
|
||||
if (me.floating && cmp) {
|
||||
me.layout.autoSize = true;
|
||||
|
||||
// show off-screen first so that we can calc position without causing a visual jump
|
||||
me.doAutoRender();
|
||||
delete me.needsLayout;
|
||||
|
||||
// Component or Element
|
||||
cmp = cmp.el || cmp;
|
||||
|
||||
// Convert absolute to floatParent-relative coordinates if necessary.
|
||||
xy = me.el.getAlignToXY(cmp, pos || me.defaultAlign, off);
|
||||
if (me.floatParent) {
|
||||
region = me.floatParent.getTargetEl().getViewRegion();
|
||||
xy[0] -= region.x;
|
||||
xy[1] -= region.y;
|
||||
}
|
||||
me.showAt(xy);
|
||||
}
|
||||
return me;
|
||||
},
|
||||
|
||||
doConstrain : function() {
|
||||
var me = this,
|
||||
y = me.el.getY(),
|
||||
max, full,
|
||||
vector,
|
||||
returnY = y, normalY, parentEl, scrollTop, viewHeight;
|
||||
|
||||
delete me.height;
|
||||
me.setSize();
|
||||
full = me.getHeight();
|
||||
if (me.floating) {
|
||||
//if our reset css is scoped, there will be a x-reset wrapper on this menu which we need to skip
|
||||
parentEl = Ext.fly(me.el.getScopeParent());
|
||||
scrollTop = parentEl.getScroll().top;
|
||||
viewHeight = parentEl.getViewSize().height;
|
||||
//Normalize y by the scroll position for the parent element. Need to move it into the coordinate space
|
||||
//of the view.
|
||||
normalY = y - scrollTop;
|
||||
max = me.maxHeight ? me.maxHeight : viewHeight - normalY;
|
||||
if (full > viewHeight) {
|
||||
max = viewHeight;
|
||||
//Set returnY equal to (0,0) in view space by reducing y by the value of normalY
|
||||
returnY = y - normalY;
|
||||
} else if (max < full) {
|
||||
returnY = y - (full - max);
|
||||
max = full;
|
||||
}
|
||||
}else{
|
||||
max = me.getHeight();
|
||||
}
|
||||
// Always respect maxHeight
|
||||
if (me.maxHeight){
|
||||
max = Math.min(me.maxHeight, max);
|
||||
}
|
||||
if (full > max && max > 0){
|
||||
me.layout.autoSize = false;
|
||||
me.setHeight(max);
|
||||
if (me.showSeparator){
|
||||
me.iconSepEl.setHeight(me.layout.getRenderTarget().dom.scrollHeight);
|
||||
}
|
||||
}
|
||||
vector = me.getConstrainVector(me.el.getScopeParent());
|
||||
if (vector) {
|
||||
me.setPosition(me.getPosition()[0] + vector[0]);
|
||||
}
|
||||
me.el.setY(returnY);
|
||||
}
|
||||
});
|
||||
|
||||
126
OfficeWeb/3rdparty/extjs/src/menu/Separator.js
vendored
Normal file
126
OfficeWeb/3rdparty/extjs/src/menu/Separator.js
vendored
Normal file
@@ -0,0 +1,126 @@
|
||||
/*
|
||||
|
||||
This file is part of Ext JS 4
|
||||
|
||||
Copyright (c) 2011 Sencha Inc
|
||||
|
||||
Contact: http://www.sencha.com/contact
|
||||
|
||||
GNU General Public License Usage
|
||||
This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file. Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||||
|
||||
If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact.
|
||||
|
||||
*/
|
||||
/**
|
||||
* Adds a separator bar to a menu, used to divide logical groups of menu items. Generally you will
|
||||
* add one of these by using "-" in your call to add() or in your items config rather than creating one directly.
|
||||
*
|
||||
* @example
|
||||
* Ext.create('Ext.menu.Menu', {
|
||||
* width: 100,
|
||||
* height: 100,
|
||||
* floating: false, // usually you want this set to True (default)
|
||||
* renderTo: Ext.getBody(), // usually rendered by it's containing component
|
||||
* items: [{
|
||||
* text: 'icon item',
|
||||
* iconCls: 'add16'
|
||||
* },{
|
||||
* xtype: 'menuseparator'
|
||||
* },{
|
||||
* text: 'seperator above',
|
||||
* },{
|
||||
* text: 'regular item',
|
||||
* }]
|
||||
* });
|
||||
*/
|
||||
Ext.define('Ext.menu.Separator', {
|
||||
extend: 'Ext.menu.Item',
|
||||
alias: 'widget.menuseparator',
|
||||
|
||||
/**
|
||||
* @cfg {String} activeCls @hide
|
||||
*/
|
||||
|
||||
/**
|
||||
* @cfg {Boolean} canActivate @hide
|
||||
*/
|
||||
canActivate: false,
|
||||
|
||||
/**
|
||||
* @cfg {Boolean} clickHideDelay @hide
|
||||
*/
|
||||
|
||||
/**
|
||||
* @cfg {Boolean} destroyMenu @hide
|
||||
*/
|
||||
|
||||
/**
|
||||
* @cfg {Boolean} disabledCls @hide
|
||||
*/
|
||||
|
||||
focusable: false,
|
||||
|
||||
/**
|
||||
* @cfg {String} href @hide
|
||||
*/
|
||||
|
||||
/**
|
||||
* @cfg {String} hrefTarget @hide
|
||||
*/
|
||||
|
||||
/**
|
||||
* @cfg {Boolean} hideOnClick @hide
|
||||
*/
|
||||
hideOnClick: false,
|
||||
|
||||
/**
|
||||
* @cfg {String} icon @hide
|
||||
*/
|
||||
|
||||
/**
|
||||
* @cfg {String} iconCls @hide
|
||||
*/
|
||||
|
||||
/**
|
||||
* @cfg {Object} menu @hide
|
||||
*/
|
||||
|
||||
/**
|
||||
* @cfg {String} menuAlign @hide
|
||||
*/
|
||||
|
||||
/**
|
||||
* @cfg {Number} menuExpandDelay @hide
|
||||
*/
|
||||
|
||||
/**
|
||||
* @cfg {Number} menuHideDelay @hide
|
||||
*/
|
||||
|
||||
/**
|
||||
* @cfg {Boolean} plain @hide
|
||||
*/
|
||||
plain: true,
|
||||
|
||||
/**
|
||||
* @cfg {String} separatorCls
|
||||
* The CSS class used by the separator item to show the incised line.
|
||||
* Defaults to `Ext.baseCSSPrefix + 'menu-item-separator'`.
|
||||
*/
|
||||
separatorCls: Ext.baseCSSPrefix + 'menu-item-separator',
|
||||
|
||||
/**
|
||||
* @cfg {String} text @hide
|
||||
*/
|
||||
text: ' ',
|
||||
|
||||
onRender: function(ct, pos) {
|
||||
var me = this,
|
||||
sepCls = me.separatorCls;
|
||||
|
||||
me.cls += ' ' + sepCls;
|
||||
|
||||
me.callParent(arguments);
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user