javascripts/right-dnd-src.js in right-rails-0.4.4 vs javascripts/right-dnd-src.js in right-rails-0.5.0

- old
+ new

@@ -1,18 +1,18 @@ /** * Drag'n'Drop module for RightJS * * See http://rightjs.org/goods/drag-n-drop * - * Copyright (C) Nikolay V. Nemshilov aka St. + * Copyright (C) 2009-2010 Nikolay V. Nemshilov */ if (!RightJS) throw "Gimme RightJS"; /** * Draggable unit * - * Copyright (C) Nikolay V. Nemshilov aka St. + * Copyright (C) 2009-2010 Nikolay V. Nemshilov */ var Draggable = new Class(Observer, { extend: { EVENTS: $w('before start drag stop drop'), @@ -260,11 +260,11 @@ this.clone.insert( this.element.setStyle({ width: this.clone.getStyle('width'), height: this.clone.getStyle('height'), position: this.clone.getStyle('position'), - zIndex: this.clone.getStyle('zIndex') + zIndex: this.clone.getStyle('zIndex') || '' }), 'before' ).remove(); } }, @@ -308,11 +308,11 @@ } }); /** * Droppable unit * - * Copyright (C) Nikolay V. Nemshilov aka St. + * Copyright (C) 2009-2010 Nikolay V. Nemshilov */ var Droppable = new Class(Observer, { extend: { EVENTS: $w('drop hover leave'), @@ -501,11 +501,11 @@ }); /** * The document events hooker * - * Copyright (C) 2009 Nikolay V. Nemshilov aka St. + * Copyright (C) 2009-2010 Nikolay V. Nemshilov */ document.on({ // parocesses the automatically discovered elements ready: function() { Draggable.rescan(); @@ -528,12 +528,12 @@ } }); /** * Element level hooks for drag'n'drops * - * Copyright (C) Nikolay V. Nemshilov aka St. + * Copyright (C) 2009-2010 Nikolay V. Nemshilov */ -Element.addMethods({ +Element.include({ makeDraggable: function(options) { new Draggable(this, options); return this; }, \ No newline at end of file