lazo-next
Version:
A client-server web framework built on Node.js that allows front-end developers to easily create a 100% SEO compliant, component MVC structured web application with an optimized first page load.
35 lines (27 loc) • 1.08 kB
JavaScript
define(['flexo', 'lazoViewMixin', 'underscore', 'lazoWidgetMixin'], function (flexo, lazoViewMixin, _, lazoWidgetMixin) {
'use strict';
return flexo.View.extend(_.extend({
getInnerHtml: function (options) {
var self = this;
flexo.View.prototype.getInnerHtml.call(this, {
success: function (html) {
self.getWidgetsHtml(html, {
success: options.success,
error: options.error
});
},
error: options.error
});
},
attach: function (el, options) {
flexo.View.prototype.attach.call(this, el, options);
this.$el.removeClass(this.getStateClass('unbound')).addClass(this.getStateClass('bound'));
this._uiStates = this.getStates();
},
_onRemove: function () {
var self = this;
flexo.View.prototype._onRemove.call(this);
this._removeWidgets();
}
}, lazoViewMixin, lazoWidgetMixin));
});