Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Ember CLI addon for RubaXa's sortable plugin

License

NotificationsYou must be signed in to change notification settings

DirtJockey/ember-cli-sortable

 
 

Repository files navigation

This is an ember-cli addon that integratesRubaXa's Sortable plugin with Ember.It is still rough around the edges but works pretty well and is currently being used in production.

Installation

ember install:npm ember-cli-sortableember generate ember-cli-sortable

Usage

{{sortable-itemsitemCollection=someArrayanimation=100handle=".item__handle"filter=".item--pinned"draggable=".item"ghostClass="item--ghost"onItemMoveAction="itemMoved"templateName="sortable-items-partial"noItemText="<div style='text-align:center'>No items found</div>"}}

You'll then need a partial namedsortable-items-partial that will have access toitemThis template will be looped over all the items in the array.

sortable-items-partial.hbs

<div>  <div>{{item.name}}</div>  <div>{{item.content}}</div></div>

You'll also need anitemMoved action handler in your controller / parent component as per the example above.

####Supports all properties and callbacks fromRubaXa's Sortable

####Properties

sortdisabledstoreanimationhandlefilterdraggableghostClassscrollscrollSensitivityscrollSpeed

####Callbacks

onStartonAddonEndonUpdateonSortonRemoveonFilter

AddAction at the end of each callback to specify your own action handlers

Example

{{sortable-itemsonStartAction="myStartAction"onAddAction="myAddAction"  ...  ...  ...}}

Contribution

Fork this repository, make a feature branch and send in a pull request.

About

Ember CLI addon for RubaXa's sortable plugin

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript86.8%
  • HTML13.2%

[8]ページ先頭

©2009-2025 Movatter.jp