mirror of
https://github.com/flarum/core.git
synced 2025-07-30 21:20:24 +02:00
Upgrade to JSON-API RC3 + latest version of tobscure/json-api
Note: npm source for ember-json-api changed to a fork, but I still had to apply a custom change to get polymorphic relationships to work (see https://github.com/kurko/ember-json-api/pull/71#issuecomment-85257281)
This commit is contained in:
@@ -18,12 +18,8 @@ export default Ember.Component.extend(FadeIn, HasItemLists, {
|
||||
// `content` property to the content of the item in the post-stream object.
|
||||
// This happens to be our post model!
|
||||
post: Ember.computed.alias('content'),
|
||||
|
||||
decodedContent: Ember.computed('post.content', function() {
|
||||
return JSON.parse(this.get('post.content'));
|
||||
}),
|
||||
oldTitle: Ember.computed.alias('decodedContent.0'),
|
||||
newTitle: Ember.computed.alias('decodedContent.1'),
|
||||
oldTitle: Ember.computed.alias('post.content.0'),
|
||||
newTitle: Ember.computed.alias('post.content.1'),
|
||||
|
||||
populateControls: function(items) {
|
||||
this.addActionItem(items, 'delete', 'Delete', 'times', 'post.canDelete');
|
||||
|
Reference in New Issue
Block a user