[Bps-public-commit] r12692 - pie/branches/named-params/pieplate/PIE-Plate/share/web/static/js

jesse at bestpractical.com jesse at bestpractical.com
Mon May 26 09:25:03 EDT 2008


Author: jesse
Date: Mon May 26 09:25:03 2008
New Revision: 12692

Modified:
   pie/branches/named-params/pieplate/PIE-Plate/share/web/static/js/pieui.js

Log:
libraryish

Modified: pie/branches/named-params/pieplate/PIE-Plate/share/web/static/js/pieui.js
==============================================================================
--- pie/branches/named-params/pieplate/PIE-Plate/share/web/static/js/pieui.js	(original)
+++ pie/branches/named-params/pieplate/PIE-Plate/share/web/static/js/pieui.js	Mon May 26 09:25:03 2008
@@ -10,8 +10,11 @@
             drop: function(ev, ui) { 
                     var newitem = jQuery(ui.draggable).clone();
                       var orig = jQuery(ui.draggable); 
+                      if (!orig.parent().hasClass('library')) {
                     orig.replaceWith(lorzy_make_empty_drop_target());
                     orig.droppable(droppable_args);
+
+                    }
                     newitem.draggable(lorzy_draggable_opts);
                     newitem.droppable(lorzy_draggable_opts);
                     newitem.attr({style: 'display: block'});
@@ -20,21 +23,6 @@
 }};
 
 
-var library_drop_args = {
-            accept: '.library .lorzy-expression',
-            greedy: 'true',
-            hover: 'pointer',
-            activeClass: 'droppable-active',
-            hoverClass: 'droppable-hover',
-            tolerance: 'pointer',
-            drop: function(ev, ui) { 
-                    var newitem = jQuery(ui.draggable).clone();
-                    newitem.draggable(lorzy_draggable_opts);
-                    newitem.droppable(lorzy_draggable_opts);
-                    newitem.attr({style: 'display: block'});
-                    newitem.insertAfter(this);
-                   lorzy_wrap_in_drop_targets(newitem);
-}};
 
 
 
@@ -155,8 +143,7 @@
     jQuery('#wrapper').after(jQuery('<a>Traverse</a>').attr('id', 'clicky'));
     jQuery('#wrapper').after(jQuery('<a>Test</a>').attr('id', 'testy'));
 
-jQuery('.lorzy-expression, .lorzy-target').droppable(droppable_args);
-jQuery('.lorzy-expression, .lorzy-target').droppable(library_drop_args);
+jQuery('#wrapper .lorzy-expression, #wrapper .lorzy-target').droppable(droppable_args);
 
     jQuery('#testy').click(function () {
         jQuery.ajax({



More information about the Bps-public-commit mailing list