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.LinkEditor = new Class({
Extends:MooDialog,
// Extends:MooDialog,
initialize:function (model) {
$assert(model, "model can not be null");
var panel = this._buildPanel(model);
this.parent({
closeButton:true,
destroyOnClose:true,
title:$msg('LINK'),
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();
}
});
console.error("Re-impl required ....");
// this.parent({
// closeButton:true,
// destroyOnClose:true,
// title:$msg('LINK'),
// 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);
},

View File

@@ -434,7 +434,7 @@ mindplot.widget.Menu = new Class({
}
var videoElem = document.id("tutorialVideo");
var videoElem = $('#tutorialVideo');
if (videoElem) {
var width = 900;
var height = 500;

View File

@@ -17,80 +17,82 @@
*/
mindplot.widget.ModalDialogNotifier = new Class({
Extends:MooDialog,
initialize:function () {
this.parent({
closeButton:false,
destroyOnClose:false,
autoOpen:true,
useEscKey:false,
closeOnOverlayClick:false,
title:"",
onInitialize:function (wrapper) {
wrapper.setStyle('opacity', 0);
this.wrapper.setStyle('display', 'none');
this.fx = new Fx.Morph(wrapper, {
duration:100,
transition:Fx.Transitions.Bounce.easeOut
});
},
onBeforeOpen:function () {
var panel = this._buildPanel();
this.setContent(panel);
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');
this.wrapper.setStyle('display', 'block');
}.bind(this));
},
onBeforeClose:function () {
this.fx.start({
'margin-top':[-100, 0],
opacity:0,
duration:200
}).chain(function () {
this.wrapper.setStyle('display', 'none');
this.fireEvent('hide');
}.bind(this));
}}
);
this.message = null;
// Extends:MooDialog,
initialize: function () {
console.error("Re-impl required ....");
// this.parent(
// {
// closeButton:false,
// destroyOnClose:false,
// autoOpen:true,
// useEscKey:false,
// closeOnOverlayClick:false,
// title:"",
// onInitialize:function (wrapper) {
// wrapper.setStyle('opacity', 0);
// this.wrapper.setStyle('display', 'none');
// this.fx = new Fx.Morph(wrapper, {
// duration:100,
// transition:Fx.Transitions.Bounce.easeOut
// });
// },
//
// onBeforeOpen:function () {
// var panel = this._buildPanel();
// this.setContent(panel);
//
// 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');
// this.wrapper.setStyle('display', 'block');
// }.bind(this));
// },
//
// onBeforeClose:function () {
// this.fx.start({
// 'margin-top':[-100, 0],
// opacity:0,
// duration:200
// }).chain(function () {
// this.wrapper.setStyle('display', 'none');
// this.fireEvent('hide');
//
// }.bind(this));
// }}
// );
// this.message = null;
},
show:function (message, title) {
show: function (message, title) {
$assert(message, "message can not be null");
this._messsage = message;
this.options.title = $defined(title) ? title : "Outch!!. An unexpected error has occurred";
this.open();
},
destroy:function () {
destroy: function () {
this.parent();
this.overlay.destroy();
},
_buildPanel:function () {
_buildPanel: function () {
var result = new Element('div');
result.setStyles({
'text-align':'center',
width:'400px'
'text-align': 'center',
width: '400px'
});
var p = new Element('p', {'text':this._messsage});
var p = new Element('p', {'text': this._messsage});
p.inject(result);
var img = new Element('img', {'src':'images/alert-sign.png'});
var img = new Element('img', {'src': 'images/alert-sign.png'});
img.inject(result);
return result;

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) {

View File

@@ -32,7 +32,7 @@ mindplot.widget.ToolbarItem = new Class({
_registerTip: function() {
return new mindplot.widget.FloatingTip(document.id(this._buttonId), {
return new mindplot.widget.FloatingTip($("#"+this._buttonId), {
html: false,
position: 'bottom',
arrowOffset : 5,