Skip to content
This repository was archived by the owner on Dec 1, 2023. It is now read-only.

Commit 221b524

Browse files
Merge branch 'develop'
2 parents 9907f8e + 95143fb commit 221b524

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
### Fixed
1212
- Fixed post url in backend view
1313
- Fixed comments count
14+
- Fixed comments filters
1415

1516
## 0.10.1 (January 11, 2016)
1617

app/views/admin/comment-index.js

+9-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module.exports = {
88
return _.merge({
99
posts: [],
1010
config: {
11-
filter: this.$session.get('comments.filter') || {}
11+
filter: this.$session.get('comments.filter', {})
1212
},
1313
comments: false,
1414
pages: 0,
@@ -30,10 +30,17 @@ module.exports = {
3030

3131
watch: {
3232

33-
'config.page': 'load',
33+
'config.page': function (page, old) {
34+
if (page == old) {
35+
return;
36+
}
37+
38+
this.load();
39+
},
3440

3541
'config.filter': {
3642
handler: function (filter) {
43+
this.load();
3744
this.$session.set('comments.filter', filter);
3845
},
3946
deep: true

app/views/admin/post-index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module.exports = {
88
return _.merge({
99
posts: false,
1010
config: {
11-
filter: this.$session.get('posts.filter') || {order: 'date desc', limit:25}
11+
filter: this.$session.get('posts.filter', {order: 'date desc', limit:25})
1212
},
1313
pages: 0,
1414
count: '',

0 commit comments

Comments
 (0)