Fix vfsMime & expose to use this.node instead of image

This commit is contained in:
Nathan Gray 2015-01-19 19:42:03 +00:00
parent de4d246726
commit ff2f486c3f
2 changed files with 13 additions and 12 deletions

View File

@ -287,15 +287,15 @@ var et2_vfsMime = expose(et2_valueWidget.extend([et2_IDetachedDOM],
{
var self=this;
if (this.options.expose_callback)
{
jQuery(this.expose_options.container).on ('slide', function (event) {
if (this.getIndex() - this.getNum() -1 == 0 && typeof self.expose_callback == 'function')
{
//Call the callback to load more items
var content = self.expose_callback.call(this,{})
if (content) this.add(content);
}
});
{
jQuery(this.expose_options.container).on ('slide', function (event) {
if (this.getIndex() - this.getNum() -1 == 0 && typeof self.expose_callback == 'function')
{
//Call the callback to load more items
var content = self.expose_callback.call(this,{})
if (content) this.add(content);
}
});
}
},
/**
@ -381,12 +381,13 @@ var et2_vfsMime = expose(et2_valueWidget.extend([et2_IDetachedDOM],
_attrs.push("value", "class");
},
getDetachedNodes: function() {
return [this.iconOverlayContainer[0]];
return [this.node];
},
setDetachedAttributes: function(_nodes, _values) {
this.iconOverlayContainer = jQuery(_nodes[0]);
this.image = jQuery(_nodes[0].children[0]);
this.node = _nodes[0];
this.overlayContainer = _nodes[0].children[1];
if(typeof _values['class'] != "undefined") {
this.image.addClass(_values['class']);

View File

@ -186,9 +186,9 @@ function expose (widget)
{
this._super.apply(this,arguments)
var self=this;
this.image.on('click', function(){
jQuery(this.node).on('click', function(){
self._init_blueimp_gallery(_value);
});
});
},
_init_blueimp_gallery: function (_value)