Skip to content

Instantly share code, notes, and snippets.

@eduardolundgren
Created April 21, 2011 20:27
Show Gist options
  • Save eduardolundgren/935396 to your computer and use it in GitHub Desktop.
Save eduardolundgren/935396 to your computer and use it in GitHub Desktop.
Overlay test
AUI().use('overlay', function(A) {
//var O = A.Base.create('baseCellEditor', A.Overlay, [], {}, { ATTRS: { visible: {value:false} } });
var O = A.Component.create({
NAME: 'baseCellEditor',
ATTRS: {
visible: { value: false },
bodyContent: { value: 'BODY' },
footerContent: { value: 'FOOTER' }
},
EXTENDS: A.Overlay,
prototype: {
initializer: function() {
this.after({
visibleChange: function(event) { console.log(event.newVal); }
});
}
}
});
var o = new O({});
A.one('doc').once('mousedown', function() {
o.render(); console.log('RENDER');
});
A.one('doc').once('click', function() {
o.show(); console.log('SHOW');
});
});
AUI().use('overlay', function(A) {
//var O = A.Base.create('baseCellEditor', A.Overlay, [], {}, { ATTRS: { visible: {value:false} } });
var O = A.Component.create({
NAME: 'baseCellEditor',
ATTRS: {
visible: { value: false },
bodyContent: { value: 'BODY' },
footerContent: { value: 'FOOTER' }
},
EXTENDS: A.Overlay,
prototype: {
initializer: function() {
this.after({
visibleChange: function(event) { console.log(event.newVal); }
});
}
}
});
var o = new O();
A.one('doc').once('click', function() {
o.render();
setTimeout(function() { o.show(); }, 500); });
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment