upgraded yui to 2.2.2 and yui-ext to 1.0.1a
This commit is contained in:
parent
4d9af2c691
commit
547ced6500
1992 changed files with 645731 additions and 0 deletions
58
www/extras/yui-ext/source/widgets/menu/Adapter.js
vendored
Normal file
58
www/extras/yui-ext/source/widgets/menu/Adapter.js
vendored
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
/*
|
||||
* Ext JS Library 1.0.1
|
||||
* Copyright(c) 2006-2007, Ext JS, LLC.
|
||||
* licensing@extjs.com
|
||||
*
|
||||
* http://www.extjs.com/license
|
||||
*/
|
||||
|
||||
/**
|
||||
* @class Ext.menu.Adapter
|
||||
* @extends Ext.menu.BaseItem
|
||||
* A base utility class that adapts a non-menu component so that it can be wrapped by a menu item and added to a menu.
|
||||
* It provides basic rendering, activation management and enable/disable logic required to work in menus.
|
||||
* @constructor
|
||||
* Creates a new Adapter
|
||||
* @param {Object} config Configuration options
|
||||
*/
|
||||
Ext.menu.Adapter = function(component, config){
|
||||
Ext.menu.Adapter.superclass.constructor.call(this, config);
|
||||
this.component = component;
|
||||
};
|
||||
Ext.extend(Ext.menu.Adapter, Ext.menu.BaseItem, {
|
||||
// private
|
||||
canActivate : true,
|
||||
|
||||
// private
|
||||
onRender : function(container, position){
|
||||
this.component.render(container);
|
||||
this.el = this.component.getEl();
|
||||
},
|
||||
|
||||
// private
|
||||
activate : function(){
|
||||
if(this.disabled){
|
||||
return false;
|
||||
}
|
||||
this.component.focus();
|
||||
this.fireEvent("activate", this);
|
||||
return true;
|
||||
},
|
||||
|
||||
// private
|
||||
deactivate : function(){
|
||||
this.fireEvent("deactivate", this);
|
||||
},
|
||||
|
||||
// private
|
||||
disable : function(){
|
||||
this.component.disable();
|
||||
Ext.menu.Adapter.superclass.disable.call(this);
|
||||
},
|
||||
|
||||
// private
|
||||
enable : function(){
|
||||
this.component.enable();
|
||||
Ext.menu.Adapter.superclass.enable.call(this);
|
||||
}
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue