mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Revert "Merge branch 'master' of https://github.com/discourse/discourse"
This reverts commite62a85cf6f, reversing changes made to2660c2e21d.
This commit is contained in:
@@ -1,4 +0,0 @@
|
||||
<p class="reason">
|
||||
{{pinned-options value=pinned topic=topic}}
|
||||
<span class="text">{{html-safe reasonText}}</span>
|
||||
</p>
|
||||
@@ -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}}
|
||||
@@ -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);
|
||||
@@ -13,7 +13,8 @@ export default DropdownSelectBoxComponent.extend({
|
||||
autoFilterable: false,
|
||||
filterable: false,
|
||||
i18nPrefix: "",
|
||||
i18nPostfix: ""
|
||||
i18nPostfix: "",
|
||||
showCaret: true
|
||||
},
|
||||
|
||||
modifyComponentForRow() {
|
||||
@@ -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() {
|
||||
@@ -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
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -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
Reference in New Issue
Block a user