mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Some select-box headers don't need a class (#12992)
* DEV: Some select-box headers don't need a class * remove duplicate class
This commit is contained in:
parent
626b8465ba
commit
a532e64389
@ -37,6 +37,7 @@ export default DropdownSelectBoxComponent.extend({
|
|||||||
filterable: false,
|
filterable: false,
|
||||||
showFullTitle: false,
|
showFullTitle: false,
|
||||||
preventHeaderFocus: true,
|
preventHeaderFocus: true,
|
||||||
|
customStyle: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@discourseComputed("isEditing", "action", "whisper", "noBump", "isInSlowMode")
|
@discourseComputed("isEditing", "action", "whisper", "noBump", "isInSlowMode")
|
||||||
|
@ -5,17 +5,22 @@ import { readOnly } from "@ember/object/computed";
|
|||||||
|
|
||||||
export default SingleSelectHeaderComponent.extend({
|
export default SingleSelectHeaderComponent.extend({
|
||||||
layout,
|
layout,
|
||||||
classNames: ["btn-default", "dropdown-select-box-header"],
|
classNames: ["dropdown-select-box-header"],
|
||||||
tagName: "button",
|
tagName: "button",
|
||||||
classNameBindings: ["btnClassName"],
|
classNameBindings: ["btnClassName", "btnStyleClass"],
|
||||||
showFullTitle: readOnly("selectKit.options.showFullTitle"),
|
showFullTitle: readOnly("selectKit.options.showFullTitle"),
|
||||||
attributeBindings: ["buttonType:type"],
|
attributeBindings: ["buttonType:type"],
|
||||||
buttonType: "button",
|
buttonType: "button",
|
||||||
|
customStyle: readOnly("selectKit.options.customStyle"),
|
||||||
|
|
||||||
btnClassName: computed("showFullTitle", function () {
|
btnClassName: computed("showFullTitle", function () {
|
||||||
return `btn ${this.showFullTitle ? "btn-icon-text" : "no-text btn-icon"}`;
|
return `btn ${this.showFullTitle ? "btn-icon-text" : "no-text btn-icon"}`;
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
btnStyleClass: computed("customStyle", function () {
|
||||||
|
return `${this.customStyle ? "" : "btn-default"}`;
|
||||||
|
}),
|
||||||
|
|
||||||
caretUpIcon: readOnly("selectKit.options.caretUpIcon"),
|
caretUpIcon: readOnly("selectKit.options.caretUpIcon"),
|
||||||
|
|
||||||
caretDownIcon: readOnly("selectKit.options.caretDownIcon"),
|
caretDownIcon: readOnly("selectKit.options.caretDownIcon"),
|
||||||
|
@ -18,6 +18,7 @@ export default DropdownSelectBoxComponent.extend({
|
|||||||
filterable: false,
|
filterable: false,
|
||||||
autoFilterable: false,
|
autoFilterable: false,
|
||||||
fullDay: "fullDay",
|
fullDay: "fullDay",
|
||||||
|
customStyle: true,
|
||||||
headerComponent: "period-chooser/period-chooser-header",
|
headerComponent: "period-chooser/period-chooser-header",
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@ export default DropdownSelectBoxComponent.extend({
|
|||||||
filterable: false,
|
filterable: false,
|
||||||
autoFilterable: false,
|
autoFilterable: false,
|
||||||
preventHeaderFocus: true,
|
preventHeaderFocus: true,
|
||||||
|
customStyle: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
modifyContent(contents) {
|
modifyContent(contents) {
|
||||||
|
Loading…
Reference in New Issue
Block a user