widget-modality-debug.js revision e7a8cf714fd2334c7ca3ccf2fcfac3163964ddd4
fa9bf5a0f37d4bea5588392a65e67c1197cc89e0Ryan Grove /*! IS_POSITION_FIXED_SUPPORTED - Juriy Zaytsev (kangax) - http://yura.thinkweb2.com/cft/ */
fa9bf5a0f37d4bea5588392a65e67c1197cc89e0Ryan Grove if (root && root.appendChild && root.removeChild) {
fa9bf5a0f37d4bea5588392a65e67c1197cc89e0Ryan Grove WidgetModal = Y.Base.create(WIDGET_MODAL, Y.Plugin.Base, [], {
8a485a720d4a37f68766d1022297dca2bd4549b7Allen Rabinovich // *** Instance Members *** //
71bbbe94567d63ab107a7eab263595bcc6e47833Allen Rabinovich // *** Lifecycle Methods *** //
fa9bf5a0f37d4bea5588392a65e67c1197cc89e0Ryan Grove destructor : function () {
fa9bf5a0f37d4bea5588392a65e67c1197cc89e0Ryan Grove this.get(HOST).get(BOUNDING_BOX).removeClass(MODAL_CLASSES.modal);
fa9bf5a0f37d4bea5588392a65e67c1197cc89e0Ryan Grove renderUI : function () {
fa9bf5a0f37d4bea5588392a65e67c1197cc89e0Ryan Grove //this makes the content box content appear over the mask
fa9bf5a0f37d4bea5588392a65e67c1197cc89e0Ryan Grove bindUI : function () {
fa9bf5a0f37d4bea5588392a65e67c1197cc89e0Ryan Grove this.afterHostEvent(VISIBLE+CHANGE, this._afterHostVisibleChange);
fa9bf5a0f37d4bea5588392a65e67c1197cc89e0Ryan Grove this.afterHostEvent(Z_INDEX+CHANGE, this._afterHostZIndexChange);
fa9bf5a0f37d4bea5588392a65e67c1197cc89e0Ryan Grove syncUI : function () {
fa9bf5a0f37d4bea5588392a65e67c1197cc89e0Ryan Grove // *** Private Methods *** //
fa9bf5a0f37d4bea5588392a65e67c1197cc89e0Ryan Grove _focus : function (e) {
8a485a720d4a37f68766d1022297dca2bd4549b7Allen Rabinovich bb.set('tabIndex', oldTI >= 0 ? oldTI : 0);
8a485a720d4a37f68766d1022297dca2bd4549b7Allen Rabinovich //Y.later(0, host, 'focus');
8a485a720d4a37f68766d1022297dca2bd4549b7Allen Rabinovich //this._detachUIHandles();
8a485a720d4a37f68766d1022297dca2bd4549b7Allen Rabinovich //host.focus();
8a485a720d4a37f68766d1022297dca2bd4549b7Allen Rabinovich //bb.set('tabIndex', oldTI);
8a485a720d4a37f68766d1022297dca2bd4549b7Allen Rabinovich _blur : function () {
8a485a720d4a37f68766d1022297dca2bd4549b7Allen Rabinovich _getMaskNode : function () {
fa9bf5a0f37d4bea5588392a65e67c1197cc89e0Ryan Grove // push on top of stack
71bbbe94567d63ab107a7eab263595bcc6e47833Allen Rabinovich stack.splice(Y.Array.indexOf(stack, this), 1);
71bbbe94567d63ab107a7eab263595bcc6e47833Allen Rabinovich topModal._uiSetHostZIndex(topModalHost.get(Z_INDEX));
71bbbe94567d63ab107a7eab263595bcc6e47833Allen Rabinovich this._maskNode.setStyle(Z_INDEX, zIndex || 0);
8a485a720d4a37f68766d1022297dca2bd4549b7Allen Rabinovich if (this._uiHandles) { return; }
c1cc0c913c4ed9ac3de73aaadd3d0db93d2240dfAllen Rabinovich bb.on('clickoutside', Y.bind(this._focus, this)),
if ( ! supportsPosFixed) {
_detachUIHandles : function () {
h.detach();
this._uiHandles = null;
_afterHostVisibleChange : function (e) {
_afterHostZIndexChange : function (e) {
_isNested: function() {
ATTRS : {
maskNode : {
readOnly : true
node: {
_GET_MASK: function() {
if (mask) {
return mask;
return mask;
STACK: []