Mercurial > defr > drupal > scald > dnd
comparison js/dnd.js @ 17:1a77f87927dd
Fixed :empty custom selector behavior in IE, a little refactoring, etc.
author | David Eads <eads@chicagotech.org> |
---|---|
date | Wed, 04 Mar 2009 13:29:31 -0600 |
parents | bb68dc3ad56f |
children |
comparison
equal
deleted
inserted
replaced
16:bb68dc3ad56f | 17:1a77f87927dd |
---|---|
133 if ($target.is('iframe')) { | 133 if ($target.is('iframe')) { |
134 | 134 |
135 // Indicate this element is draggy | 135 // Indicate this element is draggy |
136 $element.css('cursor', 'move'); | 136 $element.css('cursor', 'move'); |
137 | 137 |
138 | |
139 // Watch the iframe for changes | 138 // Watch the iframe for changes |
140 var t = setInterval(function() { | 139 var t = setInterval(function() { |
141 $('img:not(.dnd-dropped)', $(target).contents()).each(function() { | 140 $('img:not(.dnd-dropped)', $(target).contents()).each(function() { |
142 var dropped = this; | 141 var dropped = this; |
143 if (opt.idSelector(dropped) == representation_id) { | 142 if (opt.idSelector(dropped) == representation_id) { |
157 data[0] = t; | 156 data[0] = t; |
158 } | 157 } |
159 $(document).data('dnd_timers', data); | 158 $(document).data('dnd_timers', data); |
160 | 159 |
161 } else if ($target.is('textarea')) { | 160 } else if ($target.is('textarea')) { |
161 $element.css('cursor', 'pointer'); | |
162 $(element).click(function(e, data) { | 162 $(element).click(function(e, data) { |
163 opt.processTextAreaDrop(target, element, representation_id, e, data); | 163 opt.processTextAreaDrop(target, element, representation_id, e, data); |
164 }); | 164 }); |
165 } | 165 } |
166 }); | 166 }); |