comparison js/jquery.draganddrop.js @ 48:f817d2a5cc0a

DnD: Fix a JS error that occured when disabling the RTE
author Franck Deroche <defr@ows.fr>
date Mon, 19 Apr 2010 10:35:02 +0000
parents e71df38143d1
children
comparison
equal deleted inserted replaced
47:cbfe386cb51b 48:f817d2a5cc0a
126 126
127 // Watch iframes for changes 127 // Watch iframes for changes
128 $(targets).filter('iframe').each(function() { 128 $(targets).filter('iframe').each(function() {
129 var target = this; 129 var target = this;
130 var t = setInterval(function() { 130 var t = setInterval(function() {
131 var ifr = $(target)[0];
132 // Check that jQuery .contents() can work, and return early otherwise.
133 if (!ifr.contentDocument && !ifr.contentWindow) {
134 return;
135 }
131 $('img:not(.'+ opt.droppedClass +')', $(target).contents()).each(function() { 136 $('img:not(.'+ opt.droppedClass +')', $(target).contents()).each(function() {
132 opt.processIframeDrop.call(target, this, opt.idSelector); 137 opt.processIframeDrop.call(target, this, opt.idSelector);
133 var data = {'drop': this, 'representation_id': opt.idSelector(this)}; 138 var data = {'drop': this, 'representation_id': opt.idSelector(this)};
134 139
135 // Trigger event in container window 140 // Trigger event in container window