Cross-hair cursor for drags.
authorJan Schneider <jan@horde.org>
Fri, 20 Mar 2009 23:15:27 +0000 (00:15 +0100)
committerJan Schneider <jan@horde.org>
Fri, 20 Mar 2009 23:15:27 +0000 (00:15 +0100)
Don't trigger event update if dropped on the current parent.

kronolith/js/src/kronolith.js

index da0060b..50c43ae 100644 (file)
@@ -402,6 +402,9 @@ KronolithCore = {
             }
             new Drop(cell, { onDrop: function(drop) {
                 var el = DragDrop.Drags.drag.element;
+                if (drop == el.parentNode) {
+                    return;
+                }
                 drop.insert(el);
                 this.doAction('UpdateEvent',
                               { cal: el.readAttribute('calendar'),
@@ -608,6 +611,7 @@ KronolithCore = {
                         }
                         $('kronolithMonthDay' + date.key).insert(div);
                         if (event.value.e) {
+                            div.setStyle({ 'cursor': 'move' });
                             new Drag('kronolithEventmonth' + r.response.cal + event.key, { threshold: 5, parentElement: function() { return $('kronolithViewMonth').select('.kronolithViewBody')[0]; }, snapToParent: true });
                         }
                         break;