Skip to content

Commit

Permalink
Merge branch 'master' into build
Browse files Browse the repository at this point in the history
  • Loading branch information
ericf committed Sep 26, 2011
2 parents 1deba9c + 71a5efc commit c2ff40c
Show file tree
Hide file tree
Showing 12 changed files with 150 additions and 139 deletions.
2 changes: 1 addition & 1 deletion src/cache/HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Cache Change History
3.4.0
-----

* Added support to flush a specific request from the cache (hat tip to Tivac)
* Added support to flush a specific request from the cache. [Pat Cavit]

3.3.0
-----
Expand Down
34 changes: 15 additions & 19 deletions src/overlay/HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,30 @@
Overlay Change History
======================

3.4.1
-----

* No changes, see Widget and extensions for changes to dependencies.

3.4.0
-----

* No changes, see Widget and extensions for changes to
dependencies.
* No changes, see Widget and extensions for changes to dependencies.

3.3.0
-----

* No changes, see Widget and extensions for changes to
dependencies.
* No changes, see Widget and extensions for changes to dependencies.

3.2.0
-----

* No changes, see Widget and extensions for changes to
dependencies.
* No changes, see Widget and extensions for changes to dependencies.

3.1.1
-----

* No changes
* No changes.

3.1.0
-----
Expand All @@ -34,17 +36,11 @@ Overlay Change History
3.0.0
-----

* Modified progressive enhancement use case, to use document
fragments instead of innerHTML to preserve event listeners.

* Fixed use of centered, x and y in the constructor. These all
needed 'lazyAdd' configuration since they had setters which
modified other attribute state.

3.0.0 beta 1
------------
* Initial release.

* No changes
* Modified progressive enhancement use case, to use Document Fragments instead
of `innerHTML` to preserve event listeners.

3.0.0PR2 - Initial release
--------------------------
* Fixed use of `centered`, `x` and `y` in the constructor. These all needed
`lazyAdd` configuration since they had setters which modified other
attribute state.
4 changes: 3 additions & 1 deletion src/panel/HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ Panel Change History
the close button across browsers and varying amounts of content.
[Ticket #2530978]

* Panel now has a Night skin. [Ticket #2530937]
* Panel now has a working Night skin. [Ticket #2530937]

* The sprite image assets for the "close" button on Panels have moved into the
WidgetButtons extension's assets. [Ticket #2530952]

* See also Widget and extensions for changes to dependencies.

3.4.0
-----

Expand Down
3 changes: 1 addition & 2 deletions src/widget-anim/HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,4 @@ Widget Anim Change History
3.1.0
-----

* Initial release

* Initial release.
2 changes: 1 addition & 1 deletion src/widget-buttons/HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ Widget Buttons Change History
[Ticket #2530998]

3.4.0
--------
-----

* Initial release.
8 changes: 7 additions & 1 deletion src/widget-modality/HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@ Widget Modality Change History
-----

* Fixed focus-contention issues which caused infinite recursion when multiple
modal Panels were visible on the page at the same time. [Ticket #2530953]
modal Panels were visible on the page at the same time. [Ticket #2530953]

* It is now possible to instantiate a Widget that uses the WidgetModality
extension without needing to pass in a configuration Object.
[Contributed by Jakub Kuźma] [Ticket #2531086]

* Replaced references to `document` with `Y.config.doc`. [Ticket #2531220]

3.4.0
-----
Expand Down
99 changes: 50 additions & 49 deletions src/widget-modality/js/Widget-Modality.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,36 @@
* @module widget-modality
*/

var WIDGET = 'widget',
RENDER_UI = 'renderUI',
BIND_UI = 'bindUI',
SYNC_UI = 'syncUI',
BOUNDING_BOX = 'boundingBox',
CONTENT_BOX = 'contentBox',
VISIBLE = 'visible',
Z_INDEX = 'zIndex',
CHANGE = 'Change',
isBoolean = Y.Lang.isBoolean,
getCN = Y.ClassNameManager.getClassName,
MaskShow = "maskShow",
MaskHide = "maskHide",
ClickOutside = "clickoutside",
FocusOutside = "focusoutside",
var WIDGET = 'widget',
RENDER_UI = 'renderUI',
BIND_UI = 'bindUI',
SYNC_UI = 'syncUI',
BOUNDING_BOX = 'boundingBox',
CONTENT_BOX = 'contentBox',
VISIBLE = 'visible',
Z_INDEX = 'zIndex',
CHANGE = 'Change',
isBoolean = Y.Lang.isBoolean,
getCN = Y.ClassNameManager.getClassName,
MaskShow = "maskShow",
MaskHide = "maskHide",
ClickOutside = "clickoutside",
FocusOutside = "focusoutside",

supportsPosFixed = (function(){

/*! IS_POSITION_FIXED_SUPPORTED - Juriy Zaytsev (kangax) - http://yura.thinkweb2.com/cft/ */

var isSupported = null,
var doc = Y.config.doc,
isSupported = null,
el, root;

if (document.createElement) {
el = document.createElement('div');
if (doc.createElement) {
el = doc.createElement('div');
if (el && el.style) {
el.style.position = 'fixed';
el.style.top = '10px';
root = document.body;
root = doc.body;
if (root && root.appendChild && root.removeChild) {
root.appendChild(el);
isSupported = (el.offsetTop === 10);
Expand All @@ -45,7 +46,7 @@ var WIDGET = 'widget',
}());

/**
* Widget extension, which can be used to add modality support to the base Widget class,
* Widget extension, which can be used to add modality support to the base Widget class,
* through the Base.create method.
*
* @class WidgetModality
Expand Down Expand Up @@ -73,7 +74,7 @@ var WIDGET = 'widget',
};

/**
* Static property used to define the default attribute
* Static property used to define the default attribute
* configuration introduced by WidgetModality.
*
* @property ATTRS
Expand Down Expand Up @@ -112,7 +113,7 @@ var WIDGET = 'widget',
* The implementer can supply an array of objects, with each object having the following properties:
* <p>eventName: (string, required): The eventName to listen to.</p>
* <p>node: (Y.Node, optional): The Y.Node that will fire the event (defaults to the boundingBox of the widget)</p>
* <p>By default, this attribute consists of two objects which will cause the widget to re-focus if anything
* <p>By default, this attribute consists of two objects which will cause the widget to re-focus if anything
* outside the widget is clicked on or focussed upon.</p>
*/
focusOn: {
Expand Down Expand Up @@ -156,14 +157,14 @@ var WIDGET = 'widget',
return mask;
}
else {

mask = Y.Node.create('<div></div>');
mask.addClass(MODAL_CLASSES.mask);
if (supportsPosFixed) {
mask.setStyles({
position : 'fixed',
width : '100%',
height : '100%',
height : '100%',
top : '0',
left : '0',
display : 'block'
Expand All @@ -186,12 +187,12 @@ var WIDGET = 'widget',
}

};

/**
* A stack of Y.Widget objects representing the current hierarchy of modal widgets presently displayed on the screen
* @property STACK
*/
WidgetModal.STACK = [];
WidgetModal.STACK = [];


WidgetModal.prototype = {
Expand All @@ -212,7 +213,7 @@ var WIDGET = 'widget',
* @protected
*/
_renderUIModal : function () {

var bb = this.get(BOUNDING_BOX);
//cb = this.get(CONTENT_BOX);

Expand Down Expand Up @@ -241,7 +242,7 @@ var WIDGET = 'widget',
this.after(VISIBLE+CHANGE, this._afterHostVisibleChangeModal);
this.after(Z_INDEX+CHANGE, this._afterHostZIndexChangeModal);
this.after("focusOnChange", this._afterFocusOnChange);

//realign the mask in the viewport if positionfixed is not supported.
//ios and android don't support it and the current feature test doesnt
//account for this, so we are doing UA sniffing here. This should be replaced
Expand Down Expand Up @@ -314,31 +315,31 @@ var WIDGET = 'widget',
maskNode = this.get('maskNode'),
isModal = this.get('modal'),
topModal, index;

if (visible) {

Y.Array.each(stack, function(modal){
modal._detachUIHandlesModal();
modal._blur();
});

// push on top of stack
stack.unshift(this);

//this._attachUIHandlesModal();
this._repositionMask(this);
this._uiSetHostZIndexModal(this.get(Z_INDEX));
WidgetModal._GET_MASK().show();

if (isModal) {
//this._attachUIHandlesModal();
Y.later(1, this, '_attachUIHandlesModal');
this._focus();
}


} else {

index = Y.Array.indexOf(stack, this);
if (index >= 0) {
// Remove modal widget from global stack.
Expand All @@ -347,9 +348,9 @@ var WIDGET = 'widget',

this._detachUIHandlesModal();
this._blur();

if (stack.length) {
topModal = stack[0];
topModal = stack[0];
this._repositionMask(topModal);
//topModal._attachUIHandlesModal();
topModal._uiSetHostZIndexModal(topModal.get(Z_INDEX));
Expand All @@ -359,15 +360,15 @@ var WIDGET = 'widget',
Y.later(1, topModal, '_attachUIHandlesModal');
topModal._focus();
}

} else {

if (maskNode.getStyle('display') === 'block') {
maskNode.hide();
}

}

}
},

Expand All @@ -382,7 +383,7 @@ var WIDGET = 'widget',
if (this.get('modal')) {
this.get('maskNode').setStyle(Z_INDEX, zIndex || 0);
}

},

/**
Expand All @@ -406,7 +407,7 @@ var WIDGET = 'widget',
i, len, o;

for (i = 0, len = focusOn.length; i < len; i++) {

o = {};
o.node = focusOn[i].node;
o.ev = focusOn[i].eventName;
Expand All @@ -426,11 +427,11 @@ var WIDGET = 'widget',
else if (o.node && o.keyCode && o.ev) {
uiHandles.push(o.node.on(o.ev, focus, o.keyCode));
}

else {
Y.Log('focusOn ATTR Error: The event with name "'+o.ev+'" could not be attached.');
}

}

if ( ! supportsPosFixed) {
Expand All @@ -443,7 +444,7 @@ var WIDGET = 'widget',
},

/**
* Detaches all UI Listeners that were set in _attachUIHandlesModal from the widget.
* Detaches all UI Listeners that were set in _attachUIHandlesModal from the widget.
*
* @method _detachUIHandlesModal
*/
Expand All @@ -455,7 +456,7 @@ var WIDGET = 'widget',
},

/**
* Default function that is called when visibility is changed on the widget.
* Default function that is called when visibility is changed on the widget.
*
* @method _afterHostVisibleChangeModal
* @param {EventFacade} e The event facade of the change
Expand All @@ -466,7 +467,7 @@ var WIDGET = 'widget',
},

/**
* Default function that is called when z-index is changed on the widget.
* Default function that is called when z-index is changed on the widget.
*
* @method _afterHostZIndexChangeModal
* @param {EventFacade} e The event facade of the change
Expand Down Expand Up @@ -520,7 +521,7 @@ var WIDGET = 'widget',
bbParent.insert(maskNode, bbParent.get('firstChild'));
this.fire(MaskShow);
}

},

/**
Expand Down
2 changes: 1 addition & 1 deletion src/widget-position-align/HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Widget Position Align Change History
3.1.0
-----

* Renamed module from widget-position-ext to widget-position-align.
* Renamed module from `widget-position-ext` to `widget-position-align`.

3.0.0
-----
Expand Down
Loading

0 comments on commit c2ff40c

Please sign in to comment.