MDL-35616 import YUI 3.7.2
[moodle.git] / lib / yuilib / 3.7.2 / build / panel / panel-coverage.js
blobcd8c09d3c933b31848b4673bf3f28229220caac9
1 /*
2 YUI 3.7.2 (build 5639)
3 Copyright 2012 Yahoo! Inc. All rights reserved.
4 Licensed under the BSD License.
5 http://yuilibrary.com/license/
6 */
7 if (typeof _yuitest_coverage == "undefined"){
8     _yuitest_coverage = {};
9     _yuitest_coverline = function(src, line){
10         var coverage = _yuitest_coverage[src];
11         if (!coverage.lines[line]){
12             coverage.calledLines++;
13         }
14         coverage.lines[line]++;
15     };
16     _yuitest_coverfunc = function(src, name, line){
17         var coverage = _yuitest_coverage[src],
18             funcId = name + ":" + line;
19         if (!coverage.functions[funcId]){
20             coverage.calledFunctions++;
21         }
22         coverage.functions[funcId]++;
23     };
25 _yuitest_coverage["build/panel/panel.js"] = {
26     lines: {},
27     functions: {},
28     coveredLines: 0,
29     calledLines: 0,
30     coveredFunctions: 0,
31     calledFunctions: 0,
32     path: "build/panel/panel.js",
33     code: []
35 _yuitest_coverage["build/panel/panel.js"].code=["YUI.add('panel', function (Y, NAME) {","","// TODO: Change this description!","/**","Provides a Panel widget, a widget that mimics the functionality of a regular OS","window. Comes with Standard Module support, XY Positioning, Alignment Support,","Stack (z-index) support, modality, auto-focus and auto-hide functionality, and","header/footer button support.","","@module panel","**/","","var getClassName = Y.ClassNameManager.getClassName;","","// TODO: Change this description!","/**","A basic Panel Widget, which can be positioned based on Page XY co-ordinates and","is stackable (z-index support). It also provides alignment and centering support","and uses a standard module format for it's content, with header, body and footer","section support. It can be made modal, and has functionality to hide and focus","on different events. The header and footer sections can be modified to allow for","button support.","","@class Panel","@constructor","@extends Widget","@uses WidgetAutohide","@uses WidgetButtons","@uses WidgetModality","@uses WidgetPosition","@uses WidgetPositionAlign","@uses WidgetPositionConstrain","@uses WidgetStack","@uses WidgetStdMod","@since 3.4.0"," */","Y.Panel = Y.Base.create('panel', Y.Widget, [","    // Other Widget extensions depend on these two.","    Y.WidgetPosition,","    Y.WidgetStdMod,","","    Y.WidgetAutohide,","    Y.WidgetButtons,","    Y.WidgetModality,","    Y.WidgetPositionAlign,","    Y.WidgetPositionConstrain,","    Y.WidgetStack","], {","    // -- Public Properties ----------------------------------------------------","","    /**","    Collection of predefined buttons mapped from name => config.","","    Panel includes a \"close\" button which can be use by name. When the close","    button is in the header (which is the default), it will look like: [x].","","    See `addButton()` for a list of possible configuration values.","","    @example","        // Panel with close button in header.","        var panel = new Y.Panel({","            buttons: ['close']","        });","","        // Panel with close button in footer.","        var otherPanel = new Y.Panel({","            buttons: {","                footer: ['close']","            }","        });","","    @property BUTTONS","    @type Object","    @default {close: {}}","    @since 3.5.0","    **/","    BUTTONS: {","        close: {","            label  : 'Close',","            action : 'hide',","            section: 'header',","","            // Uses `type=\"button\"` so the button's default action can still","            // occur but it won't cause things like a form to submit.","            template  : '<button type=\"button\" />',","            classNames: getClassName('button', 'close')","        }","    }","}, {","    ATTRS: {","        // TODO: API Docs.","        buttons: {","            value: ['close']","        }","    }","});","","","}, '3.7.2', {\"requires\": [\"widget\", \"widget-autohide\", \"widget-buttons\", \"widget-modality\", \"widget-position\", \"widget-position-align\", \"widget-position-constrain\", \"widget-stack\", \"widget-stdmod\"], \"skinnable\": true});"];
36 _yuitest_coverage["build/panel/panel.js"].lines = {"1":0,"13":0,"37":0};
37 _yuitest_coverage["build/panel/panel.js"].functions = {"(anonymous 1):1":0};
38 _yuitest_coverage["build/panel/panel.js"].coveredLines = 3;
39 _yuitest_coverage["build/panel/panel.js"].coveredFunctions = 1;
40 _yuitest_coverline("build/panel/panel.js", 1);
41 YUI.add('panel', function (Y, NAME) {
43 // TODO: Change this description!
44 /**
45 Provides a Panel widget, a widget that mimics the functionality of a regular OS
46 window. Comes with Standard Module support, XY Positioning, Alignment Support,
47 Stack (z-index) support, modality, auto-focus and auto-hide functionality, and
48 header/footer button support.
50 @module panel
51 **/
53 _yuitest_coverfunc("build/panel/panel.js", "(anonymous 1)", 1);
54 _yuitest_coverline("build/panel/panel.js", 13);
55 var getClassName = Y.ClassNameManager.getClassName;
57 // TODO: Change this description!
58 /**
59 A basic Panel Widget, which can be positioned based on Page XY co-ordinates and
60 is stackable (z-index support). It also provides alignment and centering support
61 and uses a standard module format for it's content, with header, body and footer
62 section support. It can be made modal, and has functionality to hide and focus
63 on different events. The header and footer sections can be modified to allow for
64 button support.
66 @class Panel
67 @constructor
68 @extends Widget
69 @uses WidgetAutohide
70 @uses WidgetButtons
71 @uses WidgetModality
72 @uses WidgetPosition
73 @uses WidgetPositionAlign
74 @uses WidgetPositionConstrain
75 @uses WidgetStack
76 @uses WidgetStdMod
77 @since 3.4.0
78  */
79 _yuitest_coverline("build/panel/panel.js", 37);
80 Y.Panel = Y.Base.create('panel', Y.Widget, [
81     // Other Widget extensions depend on these two.
82     Y.WidgetPosition,
83     Y.WidgetStdMod,
85     Y.WidgetAutohide,
86     Y.WidgetButtons,
87     Y.WidgetModality,
88     Y.WidgetPositionAlign,
89     Y.WidgetPositionConstrain,
90     Y.WidgetStack
91 ], {
92     // -- Public Properties ----------------------------------------------------
94     /**
95     Collection of predefined buttons mapped from name => config.
97     Panel includes a "close" button which can be use by name. When the close
98     button is in the header (which is the default), it will look like: [x].
100     See `addButton()` for a list of possible configuration values.
102     @example
103         // Panel with close button in header.
104         var panel = new Y.Panel({
105             buttons: ['close']
106         });
108         // Panel with close button in footer.
109         var otherPanel = new Y.Panel({
110             buttons: {
111                 footer: ['close']
112             }
113         });
115     @property BUTTONS
116     @type Object
117     @default {close: {}}
118     @since 3.5.0
119     **/
120     BUTTONS: {
121         close: {
122             label  : 'Close',
123             action : 'hide',
124             section: 'header',
126             // Uses `type="button"` so the button's default action can still
127             // occur but it won't cause things like a form to submit.
128             template  : '<button type="button" />',
129             classNames: getClassName('button', 'close')
130         }
131     }
132 }, {
133     ATTRS: {
134         // TODO: API Docs.
135         buttons: {
136             value: ['close']
137         }
138     }
142 }, '3.7.2', {"requires": ["widget", "widget-autohide", "widget-buttons", "widget-modality", "widget-position", "widget-position-align", "widget-position-constrain", "widget-stack", "widget-stdmod"], "skinnable": true});