mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-09-12 07:10:07 +02: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({
|
||||
Implements: Options,
|
||||
Implements: mindplot.Options,
|
||||
|
||||
options: {
|
||||
cancelButton: false,
|
||||
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
mindplot.widget.FloatingTip = new Class({
|
||||
Implements: [Options, mindplot.Events],
|
||||
Implements: [mindplot.Options, mindplot.Events],
|
||||
|
||||
options: {
|
||||
animation: true,
|
||||
|
Loading…
Reference in New Issue
Block a user