~andreserl/maas/packaging_precise_rebase

« back to all changes in this revision

Viewing changes to debian/extras/jslibs/yui/panel/panel-debug.js

  • Committer: Andres Rodriguez
  • Date: 2013-03-20 18:12:30 UTC
  • mfrom: (145.2.22 precise.sru)
  • Revision ID: andreserl@ubuntu.com-20130320181230-6l5guc0nhlv2z4p7
Re-base againts latest quantal released branch towards SRU

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
YUI 3.5.1 (build 22)
 
3
Copyright 2012 Yahoo! Inc. All rights reserved.
 
4
Licensed under the BSD License.
 
5
http://yuilibrary.com/license/
 
6
*/
 
7
YUI.add('panel', function(Y) {
 
8
 
 
9
// TODO: Change this description!
 
10
/**
 
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.
 
15
 
 
16
@module panel
 
17
**/
 
18
 
 
19
var getClassName = Y.ClassNameManager.getClassName;
 
20
 
 
21
// TODO: Change this description!
 
22
/**
 
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
 
28
button support.
 
29
 
 
30
@class Panel
 
31
@constructor
 
32
@extends Widget
 
33
@uses WidgetAutohide
 
34
@uses WidgetButtons
 
35
@uses WidgetModality
 
36
@uses WidgetPosition
 
37
@uses WidgetPositionAlign
 
38
@uses WidgetPositionConstrain
 
39
@uses WidgetStack
 
40
@uses WidgetStdMod
 
41
@since 3.4.0
 
42
 */
 
43
Y.Panel = Y.Base.create('panel', Y.Widget, [
 
44
    // Other Widget extensions depend on these two.
 
45
    Y.WidgetPosition,
 
46
    Y.WidgetStdMod,
 
47
 
 
48
    Y.WidgetAutohide,
 
49
    Y.WidgetButtons,
 
50
    Y.WidgetModality,
 
51
    Y.WidgetPositionAlign,
 
52
    Y.WidgetPositionConstrain,
 
53
    Y.WidgetStack
 
54
], {
 
55
    // -- Public Properties ----------------------------------------------------
 
56
 
 
57
    /**
 
58
    Collection of predefined buttons mapped from name => config.
 
59
 
 
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].
 
62
 
 
63
    See `addButton()` for a list of possible configuration values.
 
64
 
 
65
    @example
 
66
        // Panel with close button in header.
 
67
        var panel = new Y.Panel({
 
68
            buttons: ['close']
 
69
        });
 
70
 
 
71
        // Panel with close button in footer.
 
72
        var otherPanel = new Y.Panel({
 
73
            buttons: {
 
74
                footer: ['close']
 
75
            }
 
76
        });
 
77
 
 
78
    @property BUTTONS
 
79
    @type Object
 
80
    @default {close: {}}
 
81
    @since 3.5.0
 
82
    **/
 
83
    BUTTONS: {
 
84
        close: {
 
85
            label  : 'Close',
 
86
            action : 'hide',
 
87
            section: 'header',
 
88
 
 
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')
 
93
        }
 
94
    }
 
95
}, {
 
96
    ATTRS: {
 
97
        // TODO: API Docs.
 
98
        buttons: {
 
99
            value: ['close']
 
100
        }
 
101
    }
 
102
});
 
103
 
 
104
 
 
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});