widget-modality.js revision 6ad3466e8a5a183757e6e95327edcb2f5907b737
var WIDGET = 'widget',
HOST = 'host',
RENDER_UI = 'renderUI',
BIND_UI = 'bindUI',
SYNC_UI = 'syncUI',
RENDERED = 'rendered',
BOUNDING_BOX = 'boundingBox',
CONTENT_BOX = 'contentBox',
VISIBLE = 'visible',
Z_INDEX = 'zIndex',
ALIGN = 'align',
CHANGE = 'Change',
supportsPosFixed = (function(){
/*! IS_POSITION_FIXED_SUPPORTED - Juriy Zaytsev (kangax) - http://yura.thinkweb2.com/cft/ */
var isSupported = null,
if (document.createElement) {
}
}
}
return isSupported;
}()),
(function(){
var WIDGET_MODAL = 'widgetModal',
MODAL = 'modal',
MASK = 'mask',
MODAL_CLASSES = {
};
// *** Instance Members *** //
_maskNode : null,
_uiHandles : null,
// *** Lifecycle Methods *** //
initializer : function (config) {
this.renderUI();
this.bindUI();
this.syncUI();
}
},
destructor : function () {
if (this._maskNode) {
}
this._detachUIHandles();
},
renderUI : function () {
width : '100%',
height : '100%',
top : '0',
left : '0',
display : 'block'
});
//this makes the content box content appear over the mask
position: "relative"
});
},
bindUI : function () {
},
syncUI : function () {
},
// *** Private Methods *** //
_focus : function (e) {
//host.focus();
//bb.set('tabIndex', oldTI);
},
_blur : function () {
},
_getMaskNode : function () {
return this._maskNode;
},
_uiSetHostVisible : function (visible) {
if (visible) {
this._focus();
} else {
this._detachUIHandles();
this._blur();
}
},
_uiSetHostZIndex : function (zIndex) {
},
_attachUIHandles : function (modal) {
if (this._uiHandles) { return; }
this._uiHandles = [
//bb.on('selectoutside', Y.bind(this._focus, this))
];
if ( ! supportsPosFixed) {
}, this)));
}
},
_detachUIHandles : function () {
Y.each(this._uiHandles, function(h){
h.detach();
});
this._uiHandles = null;
},
_afterHostVisibleChange : function (e) {
this._uiSetHostVisible(e.newVal);
},
_afterHostZIndexChange : function (e) {
this._uiSetHostZIndex(e.newVal);
}
}, {
// *** Static *** //
ATTRS : {
maskNode : {
getter : '_getMaskNode',
readOnly : true
},
node: {
}
},
});
}());