Skip to content

Commit

Permalink
gallery-2011.11.30-20-58 solmsted gallery-widget-weak-modality
Browse files Browse the repository at this point in the history
  • Loading branch information
YUI Builder committed Nov 30, 2011
1 parent 7b443d8 commit 061dce5
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/gallery-widget-weak-modality/build.properties
@@ -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.
7 changes: 7 additions & 0 deletions src/gallery-widget-weak-modality/build.xml
@@ -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 src/gallery-widget-weak-modality/js/widget-weak-modality.js
@@ -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));

0 comments on commit 061dce5

Please sign in to comment.