Last active
January 22, 2018 15:07
-
-
Save jelhan/42650deb0d720c60e9f8bbfd01c283be to your computer and use it in GitHub Desktop.
ember-drag-drop-mobile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
actions: { | |
itemSelected(item) { | |
alert(`Item ${item.title} selected`); | |
}, | |
sortEndAction: function() { | |
console.log('Sort Ended', this.get('sortableObjectList')); | |
} | |
}, | |
appName: 'Ember Twiddle', | |
useSwap: false, | |
sortFinishText: null, | |
sortableObjectList: Ember.A( | |
[{id: 1, title:'Number 1'}, | |
{id: 2, title:'Number 2'}, | |
{id: 3, title:'Number 3'}, | |
{id: 4, title:'Number 4'}, | |
{id: 5, title:'Number 5'}, | |
{id: 6, title:'Number 6'}, | |
{id: 7, title:'Number 7'}, | |
{id: 8, title:'Number 8'}] | |
) | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
margin: 12px 16px; | |
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; | |
font-size: 12pt; | |
} | |
.pullLeft { | |
float: left; | |
} | |
.sortObject { | |
display: block; | |
width: 200px; | |
height: 200px; | |
background: green; | |
margin: 10px; | |
position: relative; | |
} | |
.sortObject button { | |
position: absolute; | |
top: 0; | |
right: 0; | |
font-size: 30px; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.13.0", | |
"EmberENV": { | |
"FEATURES": {} | |
}, | |
"options": { | |
"use_pods": false, | |
"enable-testing": false | |
}, | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", | |
"ember": "2.16.2", | |
"ember-template-compiler": "2.16.2", | |
"ember-testing": "2.16.2" | |
}, | |
"addons": { | |
"ember-drag-drop": "0.4.7", | |
"ember-drag-drop-polyfill": "*" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment