init: function(element, model, parent, template)
{
console.log("init for gallery");
- this._super(element, model, template);
+ var submodel = model.contentModels['gallery'];
+ this._super(element, submodel, template);
this.parent = parent;
console.log("gallery model", this.model);
{
if(!this.model) return;
+ $('.choose-gallery-button', this.element).unbind();
+
/* first unbind all */
if(this.$nextButton) this.$nextButton.unbind();
if(this.$prevButton) this.$prevButton.unbind();
this.changePageZoom(this.pageZoom);
} else {
this._super(template);
+
+ var self = this;
+ $('.choose-gallery-button', self.element).click(function() {
+ console.log('CLICK CLICK')
+ self.model.setGallery($('#id_subpath', self.element).val());
+ });
}
},