Skip to content

Commit e143158

Browse files
committed
More refactoring
1 parent b038192 commit e143158

File tree

7 files changed

+7
-15
lines changed

7 files changed

+7
-15
lines changed

js/dist/forum.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/dist/forum.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/src/forum/addFrontSort.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@ export default function () {
1111

1212
extend(DiscussionList.prototype, 'sortMap', function (map) {
1313

14-
// Delete map.latest;
14+
// Delete Mapping
1515
delete map.top;
1616
delete map.newest;
1717
delete map.oldest;
1818

19+
// Re-Add Mapping to Redo Sort Order
1920
map.front = '-frontdate';
2021
map.top = '-commentCount';
2122
map.newest = '-createdAt';

js/src/forum/addStickyBadge.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default function addStickyBadge() {
99
extend(Discussion.prototype, 'badges', function(badges) {
1010
if (this.frontpage()) {
1111
badges.add('frontpage', Badge.component({
12-
type: 'front',
12+
type: 'frontpage',
1313
label: app.translator.trans('core.forum.badge.frontpage_tooltip'),
1414
icon: 'fas fa-home'
1515
}), 10);

resources/less/forum.less

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
1-
.Badge--front {
1+
.Badge--frontpage {
22
background: #7fba00;
33
}
4-
.DiscussionStickiedPost {
5-
& .EventPost-icon,
6-
& .EventPost-info,
7-
& .EventPost-info a {
8-
color: #7fba00;
9-
}
10-
}
4+
115
.DiscussionListItem-info .item-excerpt {
126
margin-top: 8px;
137
margin-right: 20px;

resources/locale/en.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,3 @@ core:
1010
admin:
1111
permissions:
1212
can_push_to_frontpage_label: Can Push to FrontPage
13-

src/Listeners/SaveFrontToDatabase.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ public function whenDiscussionWillBeSaved(Saving $event)
4242
if ((bool)$discussion->frontpage === $front) {
4343
return;
4444
}
45-
$attributes = array_get($event->data, 'attributes', []);
46-
4745
$discussion->frontdate = new DateTime();
4846

4947
$discussion->frontpage = $front;

0 commit comments

Comments
 (0)