Keep migration to jQuery ...

This commit is contained in:
Paulo Gustavo Veiga
2014-03-04 22:48:31 -03:00
parent 0d0db68038
commit b46ad170fb
20 changed files with 196 additions and 252 deletions

View File

@@ -17,49 +17,50 @@
*/
mindplot.widget.NoteEditor = new Class({
Extends:MooDialog,
// Extends:MooDialog,
initialize:function (model) {
console.log("Re-impl required ....");
$assert(model, "model can not be null");
var panel = this._buildPanel(model);
this.parent({
closeButton:true,
destroyOnClose:true,
title:$msg('NOTE'),
onInitialize:function (wrapper) {
wrapper.setStyle('opacity', 0);
this.fx = new Fx.Morph(wrapper, {
duration:600,
transition:Fx.Transitions.Bounce.easeOut
});
},
onBeforeOpen:function () {
this.overlay = new Overlay(this.options.inject, {
duration:this.options.duration
});
if (this.options.closeOnOverlayClick)
this.overlay.addEvent('click', this.close.bind(this));
this.overlay.open();
this.fx.start({
'margin-top':[-200, -100],
opacity:[0, 1]
}).chain(function () {
this.fireEvent('show');
}.bind(this));
},
onBeforeClose:function () {
this.fx.start({
'margin-top':[-100, 0],
opacity:0
}).chain(function () {
this.fireEvent('hide');
}.bind(this));
this.overlay.destroy();
}
});
this.setContent(panel);
// this.parent({
// closeButton:true,
// destroyOnClose:true,
// title:$msg('NOTE'),
// onInitialize:function (wrapper) {
// wrapper.setStyle('opacity', 0);
// this.fx = new Fx.Morph(wrapper, {
// duration:600,
// transition:Fx.Transitions.Bounce.easeOut
// });
// },
//
// onBeforeOpen:function () {
// this.overlay = new Overlay(this.options.inject, {
// duration:this.options.duration
// });
// if (this.options.closeOnOverlayClick)
// this.overlay.addEvent('click', this.close.bind(this));
// this.overlay.open();
//
// this.fx.start({
// 'margin-top':[-200, -100],
// opacity:[0, 1]
// }).chain(function () {
// this.fireEvent('show');
// }.bind(this));
// },
//
// onBeforeClose:function () {
// this.fx.start({
// 'margin-top':[-100, 0],
// opacity:0
// }).chain(function () {
// this.fireEvent('hide');
// }.bind(this));
// this.overlay.destroy();
// }
// });
// this.setContent(panel);
},
_buildPanel:function (model) {