확장 컴포넌트 지원 수정 : div 지원, dblclick 개선

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6204 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
taggon 2009-04-27 09:06:04 +00:00
parent c03dd84d0c
commit 56042c0abb

View file

@ -5667,19 +5667,19 @@ xe.XE_Extension = jQuery.Class({
var doc = this.oApp.getWYSIWYGDocument(); var doc = this.oApp.getWYSIWYGDocument();
var seq = this.seq; var seq = this.seq;
var fn = function(){ var fn = function(){
var img = jQuery(this); var obj = jQuery(this);
var comp = img.attr('editor_component'); var comp = obj.attr('editor_component');
if (comp && jQuery.isFunction(openComponent)) { if (comp && jQuery.isFunction(openComponent)) {
editorPrevNode = img.get(0); editorPrevNode = obj.get(0);
openComponent(comp, seq); openComponent(comp, seq);
} }
}; };
jQuery('img[editor_component]', doc).each(function(){ jQuery('img[editor_component],div[editor_component]', doc).each(function(){
var img = jQuery(this); var obj = jQuery(this);
if (!img.attr('xe_handled')) { if (!obj.attr('xe_handled')) {
img.attr('xe_handled', 'yes').dblclick(fn); obj.attr('xe_handled', 'yes').dblclick(fn);
} }
}); });
}, },
@ -5695,19 +5695,23 @@ xe.XE_Extension = jQuery.Class({
}, },
$ON_CHANGE_EDITING_MODE : function(mode) { $ON_CHANGE_EDITING_MODE : function(mode) {
this._addEvent(); var self = this;
setTimeout(function(){ self._addEvent(); }, 100);
}, },
$ON_PASTE_HTML : function() { $ON_PASTE_HTML : function() {
this._addEvent(); var self = this;
setTimeout(function(){ self._addEvent(); }, 100);
}, },
$ON_LOAD_IR_FIELD : function() { $ON_LOAD_IR_FIELD : function() {
this._addEvent(); var self = this;
setTimeout(function(){ self._addEvent(); }, 100);
}, },
$ON_SET_IR : function() { $ON_SET_IR : function() {
this._addEvent(); var self = this;
setTimeout(function(){ self._addEvent(); }, 100);
} }
}); });
/** /**