- init: function(element, model, template) {
- this.element = $(element);
- this.model = $(model).get(0);
- console.log('XMLView#init model:', model);
- this.template = template || this.template;
- this.element.html(render_template(this.template, {}));
-
- $(this.model)
- .bind('modelxmlfreeze.xmlview',
- function() { this.freeze('Ładowanie danych z serwera...'); }.bind(this))
- .bind('modelxmlunfreeze.xmlview',
- this.unfreeze.bind(this));
+ init: function(element, model, parent, template) {
+ this._super(element, model, template);
+ this.parent = parent;
+ this.buttonToolbar = new ButtonToolbarView(
+ $('.xmlview-toolbar', this.element),
+ this.model.toolbarButtonsModel, parent);
+
+ $('.xmlview-toolbar', this.element).bind('resize.xmlview', this.resized.bind(this));