Mercurial > defr > drupal > scald > dnd
comparison js/dnd-library.js @ 40:af4b3c09cc10
Add CSS style helping the end user visualize the dropped item
author | Franck Deroche <franck@defr.org> |
---|---|
date | Fri, 18 Sep 2009 15:18:09 +0200 |
parents | 3a8422ac941c |
children | 96b0c9ac3b28 |
comparison
equal
deleted
inserted
replaced
39:3a8422ac941c | 40:af4b3c09cc10 |
---|---|
219 var target = this | 219 var target = this |
220 // Decrement counter on delete | 220 // Decrement counter on delete |
221 $(target).bind('dnd_delete', function(e, data) { | 221 $(target).bind('dnd_delete', function(e, data) { |
222 Drupal.behaviors.dndLibrary.countElements(target, $(data.node).attr('dnd_id'), true); | 222 Drupal.behaviors.dndLibrary.countElements(target, $(data.node).attr('dnd_id'), true); |
223 }); | 223 }); |
224 $('head', $(this).contents()).append('<style type="text/css">img { display: none; } img.dnd-dropped {display: block; }</style>'); | 224 $('head', $(this).contents()).append('<style type="text/css">img { display: none; } img.dnd-dropped {display: block; } div.dnd-drop-wrapper {background: #efe; border: 1px #090 solid;}</style>'); |
225 return this; | 225 return this; |
226 }); | 226 }); |
227 }, | 227 }, |
228 processIframeDrop: function(drop, id_selector) { | 228 processIframeDrop: function(drop, id_selector) { |
229 var representation_id = id_selector.call(this, drop); | 229 var representation_id = id_selector.call(this, drop); |