3
Copyright 2012 Yahoo! Inc. All rights reserved.
4
Licensed under the BSD License.
5
http://yuilibrary.com/license/
7
YUI.add('panel', function(Y) {
9
// TODO: Change this description!
11
Provides a Panel widget, a widget that mimics the functionality of a regular OS
12
window. Comes with Standard Module support, XY Positioning, Alignment Support,
13
Stack (z-index) support, modality, auto-focus and auto-hide functionality, and
14
header/footer button support.
19
var getClassName = Y.ClassNameManager.getClassName;
21
// TODO: Change this description!
23
A basic Panel Widget, which can be positioned based on Page XY co-ordinates and
24
is stackable (z-index support). It also provides alignment and centering support
25
and uses a standard module format for it's content, with header, body and footer
26
section support. It can be made modal, and has functionality to hide and focus
27
on different events. The header and footer sections can be modified to allow for
37
@uses WidgetPositionAlign
38
@uses WidgetPositionConstrain
43
Y.Panel = Y.Base.create('panel', Y.Widget, [
44
// Other Widget extensions depend on these two.
51
Y.WidgetPositionAlign,
52
Y.WidgetPositionConstrain,
55
// -- Public Properties ----------------------------------------------------
58
Collection of predefined buttons mapped from name => config.
60
Panel includes a "close" button which can be use by name. When the close
61
button is in the header (which is the default), it will look like: [x].
63
See `addButton()` for a list of possible configuration values.
66
// Panel with close button in header.
67
var panel = new Y.Panel({
71
// Panel with close button in footer.
72
var otherPanel = new Y.Panel({
89
// Uses `type="button"` so the button's default action can still
90
// occur but it won't cause things like a form to submit.
91
template : '<button type="button" />',
92
classNames: getClassName('button', 'close')
105
}, '3.5.1' ,{requires:['widget', 'widget-autohide', 'widget-buttons', 'widget-modality', 'widget-position', 'widget-position-align', 'widget-position-constrain', 'widget-stack', 'widget-stdmod'], skinnable:true});