diff --git a/src/gallery-widget-weak-modality/build.properties b/src/gallery-widget-weak-modality/build.properties new file mode 100644 index 0000000000..052d2e9478 --- /dev/null +++ b/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 diff --git a/src/gallery-widget-weak-modality/build.properties~ b/src/gallery-widget-weak-modality/build.properties~ new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/gallery-widget-weak-modality/build.xml b/src/gallery-widget-weak-modality/build.xml new file mode 100644 index 0000000000..eb6e86c0e8 --- /dev/null +++ b/src/gallery-widget-weak-modality/build.xml @@ -0,0 +1,7 @@ + + + + Widget Weak Modality Build File + + + diff --git a/src/gallery-widget-weak-modality/build.xml~ b/src/gallery-widget-weak-modality/build.xml~ new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/gallery-widget-weak-modality/js/widget-weak-modality.js b/src/gallery-widget-weak-modality/js/widget-weak-modality.js new file mode 100644 index 0000000000..5d531edb01 --- /dev/null +++ b/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)); \ No newline at end of file