June 25, 2007

Scriptaculous 1.7.1 Beta 3 Repatched

Hi Everybody,

I added an attribute to "Sortable" so that you can turn off to show dropzone marker. (That is the original behaviour of the script.) Default of markDropZone attribute is true and you can turn it off by assigning false. (Thanks to Ben for asking for this attribute)

Sortable.create('Layer1',{tag:'div',dropOnEmpty: true, overlap:'horizontal',constraint:false, markDropZone:false});

Bugfix: I also got error in IE7 when you dont have margins and I think I solved it.

Also I realised the patch is not marking correctly when ghosting:true. So please do not use ghosting until I solve this problem.

You can find it here: http://tankut.googlepages.com/patched-scriptaculous-v2-1.7.1_beta3.zip

Waiting for your comments,


Ben Bodien said...

Hi Tankut,

That's excellent - it's working just as described here! Another possible alteration would be to supply a css class name to use for the empty place marker, rather than having one predefined class name.

This isn't something I need, but just an idea others may find useful :)

Many thanks again!

chamnap said...

Hi Tankut,

There is a little problem on IE when I drag the first item, the other two are moving downward. Can you have a check? But anyway, great job!


Elantrix said...

Love the script, saved me a lot of time and provided me with a lot more options to use now and possible in the future.

Added ability to give your own name to the empty place marker, if you don't pass this variable across, it rolls back to it's default which is 'emptyPlacMarker'.

// JavaScript
Sortable.create('sortableList', {tag: 'div',
dropOnEmpty: true,
emptyPlaceMarker: 'menuMarker',
containment: ['sortableList'], constraint: false}

// CSS
.menuMarker {
border: 1px dashed blue;

just replace this versions dragdrop.js with this one below:

Tankut Koray said...

Hi everyone,

Thanks elantrix, didnt tried but looked at your code and I think it should work. I have a naming suggestion that using 'emptyPlaceMarker' as attribute name, lets use 'dropZoneCss'. Can you update your script? And I will be posting your contribution for my latter release, I guess it is OK for you? (of course with your in it)

To chamnap, I checked it using IE 6 and yes there is a problem. Looking to solve it hopefully this weekend. But with IE7 and FF2, there shouldnt be any problem.


Pierrick said...

Is there a compressed version ?


Tankut Koray said...


sorry for late reply but I somehow make comment moderation on and that didnt notified me about your comment.

Anyway, unfortunately I dont have a compressed version, sorry.

Lewis said...

Thanks Tankut. I did hack my only version of this a few days ago, but your one works a lot better. My only suggestion would be to say which files are modified (since people like me have already modified their scriptacolous and have to copy over the changes manually) and perhaps add the default style (eg. in the Javascript see if a style is set, and if not give it a border and z-index).

Tankut Koray said...

Thanks Lewis,

I modified dragdrop.js and I have block comments to mark my additions. I am sure you can see them easily.

I also only have css class defined for drop zone marker. You can change them as you want.

Elantrix said...


I have renamed the emptyPlaceMarker attribute to dropZoneCss. Feel free to use it in the next release.

Also for some strange reason, I'm getting 12px of spacing on the bottom of the dropZones in IE6 (checked that there isnt any padding or margins and it still appears), in Firefox, it works perfectly.