3 Copyright 2012 Yahoo! Inc. All rights reserved.
4 Licensed under the BSD License.
5 http://yuilibrary.com/license/
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++;
14 coverage.lines[line]++;
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++;
22 coverage.functions[funcId]++;
25 _yuitest_coverage["build/panel/panel.js"] = {
32 path: "build/panel/panel.js",
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!
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.
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!
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
73 @uses WidgetPositionAlign
74 @uses WidgetPositionConstrain
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.
88 Y.WidgetPositionAlign,
89 Y.WidgetPositionConstrain,
92 // -- Public Properties ----------------------------------------------------
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.
103 // Panel with close button in header.
104 var panel = new Y.Panel({
108 // Panel with close button in footer.
109 var otherPanel = new Y.Panel({
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')
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});