CoreFiles by mySites.guru
gallery.js20 lines, 519 bytes, from wordpress-2.6-beta3.zip
Raw History Compare with 2.6-beta2
md5
27fc391dddaca2eb5bed233ea402ab2b
sha1
0720519223175685ad6c81a08778bea5ca445ded
sha256
1e6c54c2c3bd4f02a296f4faa35989b806412d25354e8ecce88087eef904594b
jQuery(function($) {
	var gallerySortable;
	var gallerySortableInit = function() {
		gallerySortable = $('#media-items').sortable( {
			items: '.media-item',
			placeholder: 'sorthelper',
			update: galleryReorder
		} );
	}

	// When an update has occurred, adjust the order for each item
	var galleryReorder = function(e, sort) {
		jQuery.each(sort['element'].sortable('toArray'), function(i, id) {
			jQuery('#' + id + ' .menu_order input')[0].value = i;
		});
	}

	// initialize sortable
	gallerySortableInit();
});

No other release has this exact content. See every version of this file.