Skip to content
This repository was archived by the owner on Oct 1, 2020. It is now read-only.

Improved handling of handles such that sub elements can be interacted wi...#67

Closed
andyburke wants to merge 41 commits intofarhadi:masterfrom
andyburke-forks:master
Closed

Improved handling of handles such that sub elements can be interacted wi...#67
andyburke wants to merge 41 commits intofarhadi:masterfrom
andyburke-forks:master

Conversation

@andyburke
Copy link

...th.

Improved placeholder sizing for horizontal sorting.

flying-sheep and others added 30 commits October 7, 2012 22:58
knowing the old index is a useful feature for using this in an MVVC application, since the underlying array can be spliced instead of having to be rewritten.

AngularJS example:

```javascript
function SortableCTRL($scope) {
	$scope.sortableArray = ['One', 'Two', 'Three'];
	
	$scope.sortupdate = function(e, data) {
		var start = data.oldindex,
			end   = data.item.index();
		
		$scope.sortableArray.splice(end, 0,
			$scope.sortableArray.splice(start, 1)[0]);
		
		$scope.$apply();
	};
	
	setTimeout(function() {
		$('#sortable')
			.sortable()
			.on('sortupdate', $scope.sortupdate);
	});
}```
Added option for placeholder
- added custom markup for placeholder as option, useful when using with tables.
Example :
	// JS CODE
	$('table.data tbody').sortable(
	{  
		items: 'tr' ,
		placeholder : '<tr><td colspan="7">&nbsp;</td></tr>'
	}) ;

	// CSS STYLE FOR TR > TD
	.sortable-placeholder td
	{
		background:#FFFEB8;
		height:100px;
		width:100%;
		
	}
… with.

Improved placeholder sizing for horizontal sorting.
@voidberg
Copy link
Collaborator

This project has been discontinued by its author and the new mantained version is here.

Since the projects have diverged a while ago I can't migrate issues and pull requests. Please try the new version and if the issue or pull request still makes sense, please resubmit it.

Sorry for the inconvenience.

@voidberg voidberg closed this Nov 21, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants