This reverts commit e62a85cf6f, reversing
changes made to 2660c2e21d.
This commit is contained in:
Jeff Atwood
2020-05-22 20:25:56 -07:00
parent e62a85cf6f
commit 20780a1eee
236 changed files with 717 additions and 1033 deletions

View File

@@ -1,4 +0,0 @@
<p class="reason">
{{pinned-options value=pinned topic=topic}}
<span class="text">{{html-safe reasonText}}</span>
</p>

View File

@@ -1,30 +0,0 @@
{{#if appendReason}}
<p class="reason">
{{topic-notifications-options
value=notificationLevel
topic=topic
onChange=(action "changeTopicNotificationLevel")
options=(hash
icon=icon
showFullTitle=showFullTitle
placement=placement
preventsClickPropagation=true
showCaret=showCaret
)
}}
<span class="text">{{html-safe topic.details.notificationReasonText}}</span>
</p>
{{else}}
{{topic-notifications-options
value=notificationLevel
topic=topic
onChange=(action "changeTopicNotificationLevel")
options=(hash
icon=icon
showFullTitle=showFullTitle
placement=placement
preventsClickPropagation=true
showCaret=showCaret
)
}}
{{/if}}

View File

@@ -67,7 +67,6 @@ export default ComboBoxComponent.extend({
search(filter) {
if (filter) {
filter = filter.toLowerCase();
return this.content.filter(item => {
const category = Category.findById(this.getValue(item));
const categoryName = this.getName(item);

View File

@@ -13,7 +13,8 @@ export default DropdownSelectBoxComponent.extend({
autoFilterable: false,
filterable: false,
i18nPrefix: "",
i18nPostfix: ""
i18nPostfix: "",
showCaret: true
},
modifyComponentForRow() {

View File

@@ -1,6 +1,5 @@
import I18n from "I18n";
import EmberObject, { computed, get } from "@ember/object";
import { guidFor } from "@ember/object/internals";
import EmberObject, { computed, get, guidFor } from "@ember/object";
import Component from "@ember/component";
import deprecated from "discourse-common/lib/deprecated";
import { makeArray } from "discourse-common/lib/helpers";
@@ -272,8 +271,7 @@ export default Component.extend(
selectedNameComponent: "selected-name",
castInteger: false,
preventsClickPropagation: false,
focusAfterOnChange: true,
triggerOnChangeOnTab: true
focusAfterOnChange: true
},
autoFilterable: computed("content.[]", "selectKit.filter", function() {

View File

@@ -140,11 +140,7 @@ export default Component.extend(UtilsMixin, {
this._focusFilterInput();
} else if (event.keyCode === 9) {
// Tab
if (
this.selectKit.highlighted &&
this.selectKit.isExpanded &&
this.selectKit.options.triggerOnChangeOnTab
) {
if (this.selectKit.highlighted && this.selectKit.isExpanded) {
this.selectKit.select(
this.getValue(this.selectKit.highlighted),
this.selectKit.highlighted

View File

@@ -1,28 +1,20 @@
import Component from "@ember/component";
import { action, computed } from "@ember/object";
import { action } from "@ember/object";
export default Component.extend({
layoutName: "select-kit/templates/components/topic-notifications-button",
classNames: ["topic-notifications-button"],
classNameBindings: ["isLoading"],
appendReason: true,
showFullTitle: true,
placement: "bottom-start",
notificationLevel: null,
topic: null,
showCaret: true,
isLoading: false,
icon: computed("isLoading", function() {
return this.isLoading ? "spinner" : null;
}),
@action
changeTopicNotificationLevel(levelId) {
if (levelId !== this.notificationLevel) {
this.set("isLoading", true);
this.topic.details
.updateNotifications(levelId)
.finally(() => this.set("isLoading", false));
this.topic.details.updateNotifications(levelId);
}
}
});

View File

@@ -0,0 +1,5 @@
{{pinned-options value=pinned topic=topic}}
<p class="reason">
{{html-safe reasonText}}
</p>

Some files were not shown because too many files have changed in this diff Show More