Skip to content

Commit

Permalink
Fix the public timeline for users and orgs, fix #334
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbgk committed Feb 8, 2016
1 parent 36f7182 commit 5dcf09f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
19 changes: 12 additions & 7 deletions js/components/activities/timeline.vue
Expand Up @@ -51,15 +51,20 @@ export default {
'user-card': require('components/user/card.vue'),
},
data: function() {
this.options = {
organization: this.organizationId,
user: this.userId,
};
return {
activities: new ActivityPage({cumulative: true}).fetch(this.options)
activities: new ActivityPage({cumulative: true})
};
},
ready: function() {
this.activities.fetch(this.options);
},
computed: {
options: function() {
return {
organization: this.organizationId,
user: this.userId,
};
},
enhancedActivities: function() {
let previousActivity = {};
// Sort twice by created date to keep creations over updates
Expand Down Expand Up @@ -117,7 +122,7 @@ export default {
methods: {
actor,
more: function() {
let moreElement = this.$els.more
let moreElement = this.$els.more;
moreElement.classList.remove("fa-chevron-down");
moreElement.classList.add("fa-spinner", "fa-spin");
this.activities.nextPage(this.options);
Expand All @@ -127,7 +132,7 @@ export default {
});
},
withinSameDay: function(firstDate, secondDate) {
return moment(firstDate).isSame(secondDate, 'day')
return moment(firstDate).isSame(secondDate, 'day');
},
isADuplicate: function(activity, previousActivity) {
return previousActivity.label === activity.label
Expand Down
2 changes: 1 addition & 1 deletion udata/templates/organization/dashboard.html
Expand Up @@ -44,7 +44,7 @@ <h2>{{ _('Community activity') }}</h2>
</header>
<div class="container">
<div class="row">
<div class="col-sm-12" id="activities" data-organization-id="{{ org.id }}">
<div class="col-sm-12" id="activities" organization-id="{{ org.id }}">
<div class="text-center"><span class="fa fa-4x fa-cog fa-spin"></span></div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion udata/templates/user/activity.html
Expand Up @@ -14,7 +14,7 @@

{% block user_content %}
<div class="row">
<div class="col-sm-12" id="activities" data-user-id="{{ user.id }}">
<div class="col-sm-12" id="activities" user-id="{{ user.id }}">
<div class="text-center"><span class="fa fa-4x fa-cog fa-spin"></span></div>
</div>
</div>
Expand Down

0 comments on commit 5dcf09f

Please sign in to comment.