| * The plugin system is based |
| * on registered widgets (iframes) from |
| * The widget component represents a single iframe and is |
| * implemented as a view object. |
| define(["view","plugin/service","util"], function (viewClass, serviceClass) { |
| create : function (data) { |
| return Object.create(viewClass)._init(['widget']).upgradeTo(serviceClass)._init(data).upgradeTo(this)._init(); |
| * The element of the widget as embedded in the view |
| this._el.classList.add('show'); |
| this._load.classList.add("widget", "show"); |
| obj.setAttribute('loading', 'lazy'); |
| // Per default there should at least be a button |
| // for settings, if the plugin requires settings. |
| // Otherwise a button indicating this is a plugin |
| // is a nice idea as well. |
| this.name, {'cls':['button-icon', 'plugin']}, function (e) { |
| if (this.desc !== undefined) { |
| str += "\n\n" + this.desc; |
| resize : function (data) { |
| this.show().style.height = data.height + 'px'; |
| // On closing the widget view |
| this._mgr._closeService(this.id); |