mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-12-24 12:13:49 +01:00
extract Options mootools class
This commit is contained in:
parent
5923d01791
commit
64f8c87577
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