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

Commit

Permalink
Merge branch 'release/1.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
malte-christian committed May 12, 2016
2 parents 5eca3aa + 7f160dc commit 3dab4fd
Show file tree
Hide file tree
Showing 73 changed files with 1,474 additions and 884 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 1.0.1 (May 12, 2016)

### Changed
- Smooth scroll for comment anchor links

### Fixed
- Fixed duplicated request occasionally caused by pagination

## 1.0.0 (April 13, 2016)

### Fixed
Expand All @@ -15,7 +23,7 @@
## 0.11.1 (April 1, 2016)

### Changed
- Use truncated post content as Open Graph description if not explicitly provided
- Use truncated post content as Open Graph description if not explicitly provided

### Fixed
- Fixed comments links
Expand Down
24 changes: 9 additions & 15 deletions app/views/admin/comment-index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,21 @@ module.exports = {
ready: function () {

this.Comments = this.$resource('api/blog/comment{/id}');
this.load();
this.$watch('config.page', this.load, {immediate: true});

UIkit.init(this.$el);
},

watch: {

'config.page': function (page, old) {
if (page == old) {
return;
}

this.load();
},

'config.filter': {
handler: function (filter) {
this.load();
if (this.config.page) {
this.config.page = 0;
} else {
this.load();
}

this.$session.set('comments.filter', filter);
},
deep: true
Expand Down Expand Up @@ -101,21 +98,18 @@ module.exports = {
});
},

load: function (page) {

page = page !== undefined ? page : this.$get('config.page');
load: function () {

this.cancel();

this.Comments.query({filter: this.config.filter, post: this.config.post && this.config.post.id || 0, page: page, limit: this.config.limit}).then(function (res) {
this.Comments.query({filter: this.config.filter, post: this.config.post && this.config.post.id || 0, page: this.config.page, limit: this.config.limit}).then(function (res) {

var data = res.data;

this.$set('posts', data.posts);
this.$set('comments', data.comments);
this.$set('pages', data.pages);
this.$set('count', data.count);
this.$set('config.page', page);
this.$set('selected', []);
});
},
Expand Down
20 changes: 9 additions & 11 deletions app/views/admin/post-index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,20 @@ module.exports = {
},

ready: function () {

this.resource = this.$resource('api/blog/post{/id}');
this.load();
this.$watch('config.page', this.load, {immediate: true});
},

watch: {

'config.page': 'load',

'config.filter': {
handler: function (filter) {
this.load(0);
if (this.config.page) {
this.config.page = 0;
} else {
this.load();
}

this.$session.set('posts.filter', filter);
},
deep: true
Expand Down Expand Up @@ -110,18 +112,14 @@ module.exports = {
});
},

load: function (page) {

page = page !== undefined ? page : this.config.page;

this.resource.query({ filter: this.config.filter, page: page }).then(function (res) {
load: function () {
this.resource.query({ filter: this.config.filter, page: this.config.page }).then(function (res) {

var data = res.data;

this.$set('posts', data.posts);
this.$set('pages', data.pages);
this.$set('count', data.count);
this.$set('config.page', page);
this.$set('selected', []);
});
},
Expand Down
8 changes: 8 additions & 0 deletions app/views/comments.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ module.exports = {
this.$set('post', data.posts[0]);
this.$set('count', data.count);

this.$nextTick(function () {
var anchor = jQuery(window.location.hash);

if (anchor && anchor.length) {
UIkit.Utils.scrollToElement(anchor);
}
});

this.reply();
});
},
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "pagekit/blog",
"type": "pagekit-extension",
"version": "1.0.0",
"version": "1.0.1",
"title": "Blog",
"description": "A blog extensions with a built-in comment system.",
"license": "MIT",
Expand Down
20 changes: 10 additions & 10 deletions languages/ar_EG/messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,23 @@
'Require e-mail.' => '',
'General' => '',
'Show Avatars from Gravatar.' => '',
'Unable to comment. Please try again later.' => '',
'Unable to comment. Please try again later.' => 'غير مسموح لك بالتعليق . الرجاء معاودة المحاولة في وقت لاحق.',
'Submit' => '',
'Comment' => '',
'Comments are closed.' => '',
'Enable Comments' => '',
'Appearance' => '',
'Draft' => '',
'Author' => '',
'Permalink' => '',
'Slug' => '',
'Email invalid.' => '',
'Comment not found.' => '',
'Filter by' => '',
'{1} %count% Comment selected|]1,Inf[ %count% Comments selected' => '',
'Filter by' => 'تصفية حسب',
'Comments (%count%)' => '',
'Title' => 'عنوان',
'Thank you! Your comment needs approval before showing up.' => '',
'{1} %count% Comment selected|]1,Inf[ %count% Comments selected' => '',
'Insufficient user rights.' => '',
'Posts View' => '',
'Posts View' => 'مشاهدة المشاركات',
'Default post settings' => '',
'{1} %count% Post selected|]1,Inf[ %count% Posts selected' => '',
'Comments' => '',
Expand All @@ -29,14 +28,14 @@
'Disabled' => '',
'Approved' => '',
'Edit Post' => '',
'Enable Comments' => '',
'Thank you! Your comment needs approval before showing up.' => 'شكرا لتعليقك سيتم نشره عند موافقة المشرف عليه',
'Pending Review' => '',
'Excerpt' => '',
'Excerpt' => 'مقتطفات',
'Invalid post id.' => '',
'Blog' => '',
'Logged in as %name%' => '',
'Order comments by' => '',
'Title cannot be blank.' => '',
'Title cannot be blank.' => 'لايمكن ترك حقل العنوان فارغ',
'Save' => 'حفظ',
'Status' => '',
'{0} %count% Comments|{1} %count% Comment|]1,Inf[ %count% Comments' => '',
Expand Down Expand Up @@ -80,6 +79,7 @@
'Content cannot be blank.' => '',
'Unknown' => '',
'Month and name' => '',
'Comments are closed.' => '',
'Close comments on articles older than' => '',
'Cancel' => 'إالغاء',
'Written by %name% on %date%' => '',
Expand All @@ -91,7 +91,7 @@
'Leave a comment' => '',
'{0} No comments|{1} %num% Comment|]1,Inf[ %num% Comments' => '',
'Post' => '',
'View' => '',
'View' => 'مشاهدة',
'Numeric' => '',
'Name' => 'الاسم',
);
10 changes: 5 additions & 5 deletions languages/ar_SA/messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
'Unable to comment. Please try again later.' => 'لا يمكنك التعليق الرجاء المحاولة لاحقا',
'Submit' => 'تقديم',
'Comment' => 'تعليق',
'Comments are closed.' => 'التعليقات مغلقة',
'Enable Comments' => 'تمكين التعليقات',
'Appearance' => 'المظهر',
'Draft' => 'مسودة',
'Author' => 'الكاتب',
Expand All @@ -14,10 +14,9 @@
'Email invalid.' => 'البريد الإلكتروني غير صالح',
'Comment not found.' => 'يتعدر إيجاد المشاركة',
'Filter by' => 'تصنيف حسب',
'{1} %count% Comment selected|]1,Inf[ %count% Comments selected' => '',
'Comments (%count%)' => 'تعليقات (%count%)',
'Title' => 'العنوان',
'Thank you! Your comment needs approval before showing up.' => 'شكرا ! ستتم مراجعة التعليق قبل نشره',
'{1} %count% Comment selected|]1,Inf[ %count% Comments selected' => '',
'Insufficient user rights.' => 'أنت غير مسجل',
'Posts View' => 'عرض المشاركات',
'Default post settings' => 'الإعدادات الإفتراضية للمنشور',
Expand All @@ -29,7 +28,7 @@
'Disabled' => 'معطل',
'Approved' => 'تمت الموافقة عليه',
'Edit Post' => 'تحرير المشاركة.',
'Enable Comments' => 'تمكين التعليقات',
'Thank you! Your comment needs approval before showing up.' => 'شكرا ! ستتم مراجعة التعليق قبل نشره',
'Pending Review' => 'مراجعة قيد الانتظار',
'Excerpt' => 'ملخص',
'Invalid post id.' => 'معرف المشاركة خاطئ.',
Expand All @@ -49,7 +48,7 @@
'No comments found.' => 'لا توجد تعليقات',
'Publish on' => 'نشر في',
'Name cannot be blank.' => 'الرجاء إدخال الإسم',
'Invalid slug.' => '',
'Invalid slug.' => 'مسار غير صالح',
'Please provide valid name and email.' => 'فضلا أدخل اسما وبريدا الكترونيا صحيحين.',
'You are not allowed to post comments.' => 'غير مسموح لك بكتابة التعليقات.',
'Author cannot be blank.' => 'الرجاء إدخال اسم الكاتب',
Expand Down Expand Up @@ -80,6 +79,7 @@
'Content cannot be blank.' => 'المحتوى لا يمكن أن يكون فارغا',
'Unknown' => 'غير معروف',
'Month and name' => 'شهر واسم',
'Comments are closed.' => 'التعليقات مغلقة',
'Close comments on articles older than' => 'أغلق التعليقات في المواضيع الأقدم من',
'Cancel' => 'إلغاء',
'Written by %name% on %date%' => 'كتبت من قبل %name% في %date%',
Expand Down
8 changes: 4 additions & 4 deletions languages/az@latin/messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
'Unable to comment. Please try again later.' => '',
'Submit' => '',
'Comment' => '',
'Comments are closed.' => '',
'Enable Comments' => '',
'Appearance' => '',
'Draft' => '',
'Author' => '',
Expand All @@ -14,10 +14,9 @@
'Email invalid.' => '',
'Comment not found.' => '',
'Filter by' => '',
'{1} %count% Comment selected|]1,Inf[ %count% Comments selected' => '',
'Comments (%count%)' => '',
'Title' => '',
'Thank you! Your comment needs approval before showing up.' => '',
'{1} %count% Comment selected|]1,Inf[ %count% Comments selected' => '',
'Insufficient user rights.' => '',
'Posts View' => '',
'Default post settings' => '',
Expand All @@ -29,7 +28,7 @@
'Disabled' => '',
'Approved' => '',
'Edit Post' => '',
'Enable Comments' => '',
'Thank you! Your comment needs approval before showing up.' => '',
'Pending Review' => '',
'Excerpt' => '',
'Invalid post id.' => '',
Expand Down Expand Up @@ -80,6 +79,7 @@
'Content cannot be blank.' => '',
'Unknown' => '',
'Month and name' => '',
'Comments are closed.' => '',
'Close comments on articles older than' => '',
'Cancel' => '',
'Written by %name% on %date%' => '',
Expand Down
8 changes: 4 additions & 4 deletions languages/az_AZ/messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
'Unable to comment. Please try again later.' => '',
'Submit' => '',
'Comment' => '',
'Comments are closed.' => '',
'Enable Comments' => '',
'Appearance' => '',
'Draft' => '',
'Author' => '',
Expand All @@ -14,10 +14,9 @@
'Email invalid.' => '',
'Comment not found.' => '',
'Filter by' => '',
'{1} %count% Comment selected|]1,Inf[ %count% Comments selected' => '',
'Comments (%count%)' => '',
'Title' => '',
'Thank you! Your comment needs approval before showing up.' => '',
'{1} %count% Comment selected|]1,Inf[ %count% Comments selected' => '',
'Insufficient user rights.' => '',
'Posts View' => '',
'Default post settings' => '',
Expand All @@ -29,7 +28,7 @@
'Disabled' => '',
'Approved' => '',
'Edit Post' => '',
'Enable Comments' => '',
'Thank you! Your comment needs approval before showing up.' => '',
'Pending Review' => '',
'Excerpt' => '',
'Invalid post id.' => '',
Expand Down Expand Up @@ -80,6 +79,7 @@
'Content cannot be blank.' => '',
'Unknown' => '',
'Month and name' => '',
'Comments are closed.' => '',
'Close comments on articles older than' => '',
'Cancel' => '',
'Written by %name% on %date%' => '',
Expand Down
8 changes: 4 additions & 4 deletions languages/bg_BG/messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
'Unable to comment. Please try again later.' => '',
'Submit' => '',
'Comment' => 'Коментар',
'Comments are closed.' => '',
'Enable Comments' => 'Разреши коментарите',
'Appearance' => 'Външност',
'Draft' => 'Чернова',
'Author' => 'Автор',
Expand All @@ -14,10 +14,9 @@
'Email invalid.' => '',
'Comment not found.' => '',
'Filter by' => '',
'{1} %count% Comment selected|]1,Inf[ %count% Comments selected' => '',
'Comments (%count%)' => 'Коментари (%count%)',
'Title' => '',
'Thank you! Your comment needs approval before showing up.' => '',
'{1} %count% Comment selected|]1,Inf[ %count% Comments selected' => '',
'Insufficient user rights.' => '',
'Posts View' => '',
'Default post settings' => '',
Expand All @@ -29,7 +28,7 @@
'Disabled' => '',
'Approved' => 'Одобрен',
'Edit Post' => 'Редактирай публикация',
'Enable Comments' => 'Разреши коментарите',
'Thank you! Your comment needs approval before showing up.' => '',
'Pending Review' => 'Чака ревю',
'Excerpt' => 'Откъс',
'Invalid post id.' => 'Невалиден идентификатор на публикация.',
Expand Down Expand Up @@ -80,6 +79,7 @@
'Content cannot be blank.' => '',
'Unknown' => '',
'Month and name' => 'Месец и име',
'Comments are closed.' => '',
'Close comments on articles older than' => 'Затвори коментарите към статиите по-стари от',
'Cancel' => '',
'Written by %name% on %date%' => 'Написан от %name% на %date%',
Expand Down
Loading

0 comments on commit 3dab4fd

Please sign in to comment.