forked from yui/yui3-gallery
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gallery-2011.11.30-20-58 solmsted gallery-widget-weak-modality
- Loading branch information
YUI Builder
committed
Nov 30, 2011
1 parent
7b443d8
commit 061dce5
Showing
5 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Widget Weak Modality Build Properties | ||
|
||
# As long as the 'builder' project is cloned to the default folder | ||
# next to the 'yui3-gallery' project folder, the 'builddir' property does not | ||
# need to be changed | ||
# | ||
# If the 'builder' project is checked out to an alternate location, this | ||
# property should be updated to point to the checkout location. | ||
builddir=../../../builder/componentbuild | ||
|
||
# The name of the component. E.g. event, attribute, widget | ||
component=gallery-widget-weak-modality | ||
|
||
# The list of files which should be concatenated to create the component | ||
# NOTE: For a css component. (e.g. cssfonts, cssgrids etc.) use component.cssfiles instead. | ||
# component.jsfiles=widget-weak-modality.js, widget-weak-modalityHelperClass.js, widget-weak-modalitySubComponentClass.js | ||
component.jsfiles=widget-weak-modality.js | ||
|
||
# The list of modules this component. requires. Used to set up the Y.add module call for YUI 3. | ||
component.requires=widget-modality | ||
|
||
# The list of modules this component. supersedes. Used to set up the Y.add module call for YUI 3. | ||
component.supersedes= | ||
|
||
# The list of modules that are optional for this module. Used to set up the Y.add module call for YUI 3. | ||
component.optional= | ||
# If your module has a skin file, set this flag to "true" | ||
component.skinnable=false | ||
#component.skinnable=true |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- YUI 3 Gallery Component Build File --> | ||
<project name="Widget Weak Modality" default="local"> | ||
<description>Widget Weak Modality Build File</description> | ||
<property file="build.properties" /> | ||
<import file="${builddir}/3.x/bootstrap.xml" description="Default Build Properties and Targets" /> | ||
</project> |
Empty file.
25 changes: 25 additions & 0 deletions
25
src/gallery-widget-weak-modality/js/widget-weak-modality.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
(function (Y) { | ||
'use strict'; | ||
|
||
var _some = Y.Array.some, | ||
_widgetModality = Y.WidgetModality, | ||
_widgetModalityStack = _widgetModality.STACK; | ||
|
||
_widgetModality.ATTRS.weak = { | ||
value: false | ||
}; | ||
|
||
Y.delegate('click', function () { | ||
_some(_widgetModalityStack, function (widget) { | ||
if (widget) { | ||
if (widget.get('weak')) { | ||
widget.hide(); | ||
} | ||
|
||
return true; | ||
} | ||
|
||
return false; | ||
}); | ||
}, 'body', '.yui3-widget-mask'); | ||
}(Y)); |