Skip to content

Commit 33628b8

Browse files
committed
Added jpeg image extension, admin pagination updates
1 parent 1a2c5db commit 33628b8

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

src/App/Pages/Admin/Posts/Index.cshtml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,14 @@
7171
<!--/Empty -->
7272

7373
<!-- Pagination -->
74-
<ul v-if="pageList && pageList.pager && pageList.pager.total > 0" class="bf-pagination d-flex">
74+
<ul v-if="pageList.posts && pageList.posts.length > 0" class="bf-pagination d-flex">
7575
<li v-if="pageList.pager.showOlder" class="bf-pagination-item">
76-
<a class="bf-pagination-link" :href="'posts?page=' + pageList.pager.older">
76+
<a class="bf-pagination-link" title="older" :href="pagelink('older')">
7777
<i class="bf-pagination-icon fa fa-chevron-left"></i>
7878
</a>
7979
</li>
8080
<li v-if="pageList.pager.showNewer" class="bf-pagination-item">
81-
<a class="bf-pagination-link" :href="'posts?page=' + pageList.pager.newer">
81+
<a class="bf-pagination-link" title="newer" :href="pagelink('newer')">
8282
<i class="bf-pagination-icon fa fa-chevron-right"></i>
8383
</a>
8484
</li>
@@ -150,9 +150,9 @@
150150
return false;
151151
152152
var url = getUrl('admin/posts?term=' + term + '&page=' + this.page);
153-
if(this.status == "D") { url += '&include=d'; }
154-
if(this.status == "P"){ url += '&include=fp'; }
155-
153+
if (this.status !== 'A') {
154+
url += '&status=' + this.status;
155+
}
156156
window.location.href = url;
157157
},
158158
filter: function (status) {
@@ -172,6 +172,19 @@
172172
.catch(function (error) { toastr.error(error); });
173173
}
174174
return false;
175+
},
176+
pagelink: function (direction) {
177+
var link = 'posts?page=';
178+
if (direction === 'older') {
179+
link += this.pageList.pager.older;
180+
}
181+
else {
182+
link += this.pageList.pager.newer;
183+
}
184+
if (this.status !== 'A') {
185+
link += '&status=' + this.status;
186+
}
187+
return link;
175188
}
176189
},
177190
beforeMount() {

src/App/appsettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
"Avatar": "lib/img/avatar.jpg",
77
"DemoMode": false,
8-
"ImageExtensions": "png,jpg,gif,bmp,tiff",
8+
"ImageExtensions": "png,jpg,jpeg,gif,bmp,tiff",
99
"ImportTypes": "zip,7z,xml,pdf,doc,docx,xls,xlsx,mp3,avi",
1010
"SeedData": false,
1111

0 commit comments

Comments
 (0)