2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-05 08:59:27 +08:00

Replaces toolbar popup-menu with select-kit

This commit is contained in:
Joffrey JAFFEUX 2017-12-13 10:49:32 +01:00 committed by GitHub
parent d5293aeae2
commit c1c31b99ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 250 additions and 172 deletions

View file

@ -62,6 +62,7 @@ export default Ember.Component.extend(UtilsMixin, PluginApiMixin, DomHelpersMixi
limitMatches: 100,
nameChanges: false,
allowsContentReplacement: false,
collectionHeader: null,
init() {
this._super();
@ -228,6 +229,10 @@ export default Ember.Component.extend(UtilsMixin, PluginApiMixin, DomHelpersMixi
actions: {
onToggle() {
if (this.get("onToggle")) this.sendAction("onToggle");
if (this.get("onCollapse") && this.get("isExpanded") === true) this.sendAction("onCollapse");
if (this.get("onExpand") && this.get("isExpanded") === false) this.sendAction("onExpand");
this.get("isExpanded") === true ? this.collapse() : this.expand();
},