Mercurial > defr > drupal > scald > dnd
comparison js/dnd-library.js @ 45:4344489b20e6
MEE: Don't take over all images, only those that have been dropped
| author | Franck Deroche <defr@ows.fr> |
|---|---|
| date | Wed, 25 Nov 2009 15:51:40 +0000 |
| parents | c2b8f7e1f4c1 |
| children | 2ba96288fbea |
comparison
equal
deleted
inserted
replaced
| 44:c2b8f7e1f4c1 | 45:4344489b20e6 |
|---|---|
| 223 var target = this | 223 var target = this |
| 224 // Decrement counter on delete | 224 // Decrement counter on delete |
| 225 $(target).bind('dnd_delete', function(e, data) { | 225 $(target).bind('dnd_delete', function(e, data) { |
| 226 Drupal.behaviors.dndLibrary.countElements(target, $(data.node).attr('dnd_id'), true); | 226 Drupal.behaviors.dndLibrary.countElements(target, $(data.node).attr('dnd_id'), true); |
| 227 }); | 227 }); |
| 228 $('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>'); | 228 $('head', $(this).contents()).append('<style type="text/css">img.drop { display: none; } div.dnd-drop-wrapper {background: #efe; border: 1px #090 solid;}</style>'); |
| 229 return this; | 229 return this; |
| 230 }); | 230 }); |
| 231 }, | 231 }, |
| 232 processIframeDrop: function(drop, id_selector) { | 232 processIframeDrop: function(drop, id_selector) { |
| 233 var representation_id = id_selector.call(this, drop); | 233 var representation_id = id_selector.call(this, drop); |
| 234 if (!Drupal.settings.dndEditorRepresentations[representation_id]) return; | |
| 234 var representation = Drupal.settings.dndEditorRepresentations[representation_id].body; | 235 var representation = Drupal.settings.dndEditorRepresentations[representation_id].body; |
| 235 var legend = Drupal.settings.dndEditorRepresentations[representation_id].meta.legend; | 236 var legend = Drupal.settings.dndEditorRepresentations[representation_id].meta.legend; |
| 236 var target = this, $target = $(target), $drop = $(drop), block; | 237 var target = this, $target = $(target), $drop = $(drop), block; |
| 237 | 238 |
| 238 // Update element count | 239 // Update element count |
