widget-autohide-debug.js revision c714ee41455a161bf18197074d7e205b9d03b377
var WIDGET_AUTOHIDE = 'widgetAutohide',
AUTOHIDE = 'autohide',
CLICK_OUTSIDE = 'clickoutside',
FOCUS_OUTSIDE = 'focusoutside',
PRESS_ESCAPE = 'down:27',
BIND_UI = 'bindUI',
SYNC_UI = "syncUI",
RENDERED = "rendered",
BOUNDING_BOX = "boundingBox",
VISIBLE = "visible",
HOST = "host",
CHANGE = 'Change',
// *** Instance Members *** //
_uiHandles : null,
// *** Lifecycle Methods *** //
initializer : function (config) {
this.bindUI();
this.syncUI();
}
},
destructor : function () {
this._detachUIHandles();
},
bindUI : function () {
},
syncUI : function () {
},
// *** Private Methods *** //
_uiSetHostVisible : function (visible) {
if (visible) {
//this._attachUIHandles();
} else {
this._detachUIHandles();
}
},
_attachUIHandles : function () {
if (this._uiHandles) { return; }
uiHandles = [],
self = this,
i = 0;
//push all UI events
}
i = 0;
//push all key press events
for (; i < hideOnKeyPress.length; i++) {
}
/*
if (this.get(CLICKED_OUTSIDE)) {
uiHandles.push(bb.on('clickoutside', hide));
}
if (this.get(FOCUSED_OUTSIDE)) {
uiHandles.push(bb.on('focusoutside', hide));
}
if (this.get(PRESSED_ESCAPE)) {
uiHandles.push(Y.one('document').on('key', hide, 'down:27'));
}
*/
this._uiHandles = uiHandles;
},
_detachUIHandles : function () {
Y.each(this._uiHandles, function(h){
h.detach();
});
this._uiHandles = null;
},
_afterHostVisibleChange : function (e) {
this._uiSetHostVisible(e.newVal);
}
}, {
// *** Static *** //
ATTRS : {
hideOnUI: {
},
value: [PRESS_ESCAPE],
}
}
});