changeset 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
files js/dnd-library.js
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/js/dnd-library.js	Thu Oct 29 17:08:26 2009 +0000
+++ b/js/dnd-library.js	Wed Nov 25 15:51:40 2009 +0000
@@ -225,12 +225,13 @@
         $(target).bind('dnd_delete', function(e, data) {
           Drupal.behaviors.dndLibrary.countElements(target, $(data.node).attr('dnd_id'), true); 
         });
-        $('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>');
+        $('head', $(this).contents()).append('<style type="text/css">img.drop { display: none; } div.dnd-drop-wrapper {background: #efe; border: 1px #090 solid;}</style>');
         return this;
       });
     },
     processIframeDrop: function(drop, id_selector) {
       var representation_id = id_selector.call(this, drop);
+      if (!Drupal.settings.dndEditorRepresentations[representation_id]) return;
       var representation = Drupal.settings.dndEditorRepresentations[representation_id].body;
       var legend = Drupal.settings.dndEditorRepresentations[representation_id].meta.legend;
       var target = this, $target = $(target), $drop = $(drop), block;