Last active
March 18, 2018 16:33
-
-
Save onechiporenko/cfd701072eb69fa17722dbe973e15cfe to your computer and use it in GitHub Desktop.
'Colspan and custom filter (2.5.0)
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'; | |
const {computed} = Ember; | |
const {alias} = computed; | |
export default Ember.Component.extend({ | |
tagName: 'img', | |
attributeBindings: ['src', 'alt', 'style'], | |
src: alias('record.author.avatarUrl'), | |
alt: alias('record.author.login'), | |
style: computed(function () { | |
return Ember.String.htmlSafe('width: 30px; height: 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
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
}); |
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({ | |
appName: 'Colspan and custom filter (2.5.0)' | |
}); |
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({ | |
columns: [ | |
{ | |
component: 'href-to', | |
anchorPropertyName: 'tagName', | |
hrefPropertyName: 'htmlUrl', | |
title: 'Tag', | |
filteredBy: 'tagName' | |
}, | |
{ | |
propertyName: 'publishedAt', | |
simple: true | |
}, | |
{ | |
component: 'gh-avatar', | |
colspanForFilterCell: 2, | |
colspanForSortCell: 2, | |
title: 'Author', | |
filteredBy: 'author.login', | |
sortedBy: 'author.login' | |
}, | |
{ | |
component: 'href-to', | |
title: 'Profile URL', | |
anchorPropertyName: 'author.login', | |
hrefPropertyName: 'author.htmlUrl' | |
} | |
] | |
}); |
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.Route.extend({ | |
model() { | |
return this.get('store').query('github-release', { repo: 'emberjs/ember.js', per_page: 100 }); | |
} | |
}); |
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", | |
"bs-css": "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css", | |
"bs-js": "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" | |
}, | |
"addons": { | |
"ember-data": "2.16.3", | |
"ember-models-table": "2.5.0", | |
"ember-data-github": "0.7.0" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment