Solstice
view release on metacpan or search on metacpan
javascript/yui/build/menu/menu-debug.js view on Meta::CPAN
// Add configuration attributes
/*
Change the default value for the "visible" configuration
property to "false" by re-adding the property.
*/
/**
* @config visible
* @description Boolean indicating whether or not the menu is visible. If
* the menu's "position" configuration property is set to "dynamic" (the
* default), this property toggles the menu's <code><div></code>
* element's "visibility" style property between "visible" (true) or
* "hidden" (false). If the menu's "position" configuration property is
* set to "static" this property toggles the menu's
* <code><div></code> element's "display" style property
* between "block" (true) or "none" (false).
* @default false
* @type Boolean
*/
oConfig.addProperty(
DEFAULT_CONFIG.VISIBLE.key,
{
handler: this.configVisible,
value: DEFAULT_CONFIG.VISIBLE.value,
validator: DEFAULT_CONFIG.VISIBLE.validator
}
);
/*
Change the default value for the "constraintoviewport" configuration
property to "true" by re-adding the property.
*/
/**
* @config constraintoviewport
* @description Boolean indicating if the menu will try to remain inside
* the boundaries of the size of viewport.
* @default true
* @type Boolean
*/
oConfig.addProperty(
DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.key,
{
handler: this.configConstrainToViewport,
value: DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.value,
validator: DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.validator,
supercedes: DEFAULT_CONFIG.CONSTRAIN_TO_VIEWPORT.supercedes
}
);
/**
* @config position
* @description String indicating how a menu should be positioned on the
* screen. Possible values are "static" and "dynamic." Static menus are
* visible by default and reside in the normal flow of the document
* (CSS position: static). Dynamic menus are hidden by default, reside
* out of the normal flow of the document (CSS position: absolute), and
* can overlay other elements on the screen.
* @default dynamic
* @type String
*/
oConfig.addProperty(
DEFAULT_CONFIG.POSITION.key,
{
handler: this.configPosition,
value: DEFAULT_CONFIG.POSITION.value,
validator: DEFAULT_CONFIG.POSITION.validator,
supercedes: DEFAULT_CONFIG.POSITION.supercedes
}
);
/**
* @config submenualignment
* @description Array defining how submenus should be aligned to their
* parent menu item. The format is: [itemCorner, submenuCorner]. By default
* a submenu's top left corner is aligned to its parent menu item's top
* right corner.
* @default ["tl","tr"]
* @type Array
*/
oConfig.addProperty(
DEFAULT_CONFIG.SUBMENU_ALIGNMENT.key,
{
value: DEFAULT_CONFIG.SUBMENU_ALIGNMENT.value
}
);
/**
* @config autosubmenudisplay
* @description Boolean indicating if submenus are automatically made
* visible when the user mouses over the menu's items.
* @default true
* @type Boolean
*/
oConfig.addProperty(
DEFAULT_CONFIG.AUTO_SUBMENU_DISPLAY.key,
{
value: DEFAULT_CONFIG.AUTO_SUBMENU_DISPLAY.value,
validator: DEFAULT_CONFIG.AUTO_SUBMENU_DISPLAY.validator
}
);
/**
* @config showdelay
* @description Number indicating the time (in milliseconds) that should
* expire before a submenu is made visible when the user mouses over
* the menu's items.
* @default 250
* @type Number
*/
oConfig.addProperty(
DEFAULT_CONFIG.SHOW_DELAY.key,
{
value: DEFAULT_CONFIG.SHOW_DELAY.value,
validator: DEFAULT_CONFIG.SHOW_DELAY.validator
javascript/yui/build/menu/menu-debug.js view on Meta::CPAN
}
}
},
// Public methods
/**
* @method toString
* @description Returns a string representing the menu bar.
* @return {String}
*/
toString: function() {
var sReturnVal = "MenuBar",
sId = this.id;
if(sId) {
sReturnVal += (" " + sId);
}
return sReturnVal;
},
/**
* @description Initializes the class's configurable properties which can be
* changed using the menu bar's Config object ("cfg").
* @method initDefaultConfig
*/
initDefaultConfig: function() {
MenuBar.superclass.initDefaultConfig.call(this);
var oConfig = this.cfg;
// Add configuration properties
/*
Set the default value for the "position" configuration property
to "static" by re-adding the property.
*/
/**
* @config position
* @description String indicating how a menu bar should be positioned on the
* screen. Possible values are "static" and "dynamic." Static menu bars
* are visible by default and reside in the normal flow of the document
* (CSS position: static). Dynamic menu bars are hidden by default, reside
* out of the normal flow of the document (CSS position: absolute), and can
* overlay other elements on the screen.
* @default static
* @type String
*/
oConfig.addProperty(
DEFAULT_CONFIG.POSITION.key,
{
handler: this.configPosition,
value: DEFAULT_CONFIG.POSITION.value,
validator: DEFAULT_CONFIG.POSITION.validator,
supercedes: DEFAULT_CONFIG.POSITION.supercedes
}
);
/*
Set the default value for the "submenualignment" configuration property
to ["tl","bl"] by re-adding the property.
*/
/**
* @config submenualignment
* @description Array defining how submenus should be aligned to their
* parent menu bar item. The format is: [itemCorner, submenuCorner].
* @default ["tl","bl"]
* @type Array
*/
oConfig.addProperty(
DEFAULT_CONFIG.SUBMENU_ALIGNMENT.key,
{
value: DEFAULT_CONFIG.SUBMENU_ALIGNMENT.value
}
);
/*
Change the default value for the "autosubmenudisplay" configuration
property to "false" by re-adding the property.
*/
/**
* @config autosubmenudisplay
* @description Boolean indicating if submenus are automatically made
* visible when the user mouses over the menu bar's items.
* @default false
* @type Boolean
*/
oConfig.addProperty(
DEFAULT_CONFIG.AUTO_SUBMENU_DISPLAY.key,
{
value: DEFAULT_CONFIG.AUTO_SUBMENU_DISPLAY.value,
validator: DEFAULT_CONFIG.AUTO_SUBMENU_DISPLAY.validator
}
);
}
}); // END YAHOO.lang.extend
}());
( run in 0.805 second using v1.01-cache-2.11-cpan-39bf76dae61 )