This file contains 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'; | |
var { set } = Ember; | |
export default Ember.Component.extend({ | |
classNames : [ 'draggableDropzone' ], | |
classNameBindings : [ 'dragClass' ], | |
dragClass : 'deactivated', | |
dragLeave(event) { |
This file contains 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'; | |
var { get } = Ember; | |
export default Ember.Component.extend({ | |
classNames : [ 'draggableItem' ], | |
attributeBindings : [ 'draggable' ], | |
draggable : 'true', | |
dragStart(event) { |
This file contains 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
drop(event) { | |
// ... | |
this.sendAction('dropped', data); | |
} |
This file contains 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'; | |
var { computed, get } = Ember; | |
export default Ember.ArrayController.extend({ | |
selectedUsers : Ember.A([]), | |
remainingUsers : computed.setDiff('model', 'selectedUsers'), | |
remainingUsersLength : computed.alias('remainingUsers.length'), | |
actions: { |
This file contains 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
$default-margin : 20px; | |
$gray-light : #e1e1e1; | |
$gray-medium : #aaa; | |
$green : #2ecc71; | |
$white : #fff; | |
$black : #111; | |
.draggableDropzone { | |
display: block; | |
border: 3px dashed $gray-medium; |
This file contains 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'; | |
import { sample: computedSample } from '../macros/computed/sample'; | |
var { computed } = Ember; | |
export default Ember.Component.extend({ | |
tagName : 'h1', | |
classNames : [ 'loading', 'animated', 'fadeIn' ], | |
showLoadingMessages : false, | |
randomLoadingMessage : computedSample('loadingMessages'), |
This file contains 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'; | |
var { computed, getWithDefault } = Ember; | |
export default function(dependentKey) { | |
return ( | |
computed(`${dependentKey}.@each`, function() { | |
var emptyArray = Ember.A([]); | |
var items = getWithDefault(this, dependentKey, emptyArray); | |
var length = items.get('length'); |
This file contains 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
i.ellipsis i { | |
font-style: normal; | |
opacity: 0; | |
-webkit-animation: dot 1.3s infinite; | |
-webkit-animation-delay: 0s; | |
-moz-animation: dot 1.3s infinite; | |
-moz-animation-delay: 0s; | |
-o-animation: dot 1.3s infinite; | |
-o-animation-delay: 0s; | |
animation: dot 1.3s infinite; |