mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-29 17:04:59 +01:00
extract Options mootools class
This commit is contained in:
parent
4b3a00f2e8
commit
597205751e
13
mindplot/src/main/javascript/Options.js
Normal file
13
mindplot/src/main/javascript/Options.js
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
mindplot.Options = new Class({
|
||||||
|
|
||||||
|
setOptions: function(){
|
||||||
|
var options = this.options = Object.merge.apply(null, [{}, this.options].append(arguments));
|
||||||
|
if (this.addEvent) for (var option in options){
|
||||||
|
if (typeOf(options[option]) != 'function' || !(/^on[A-Z]/).test(option)) continue;
|
||||||
|
this.addEvent(option, options[option]);
|
||||||
|
delete options[option];
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
@ -1,5 +1,5 @@
|
|||||||
var BootstrapDialog = new Class({
|
var BootstrapDialog = new Class({
|
||||||
Implements: Options,
|
Implements: mindplot.Options,
|
||||||
|
|
||||||
options: {
|
options: {
|
||||||
cancelButton: false,
|
cancelButton: false,
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
mindplot.widget.FloatingTip = new Class({
|
mindplot.widget.FloatingTip = new Class({
|
||||||
Implements: [Options, mindplot.Events],
|
Implements: [mindplot.Options, mindplot.Events],
|
||||||
|
|
||||||
options: {
|
options: {
|
||||||
animation: true,
|
animation: true,
|
||||||
|
Loading…
Reference in New Issue
Block a user