adapterDidCommit: function() { // Merge in-flight attributes if any if (Ember.keys(this._inFlightAttributes).length) { Ember.mixin(this._data, this._inFlightAttributes); this._inFlightAttributes = {}; } var fragment; // Notify fragments that the owner record was committed for (var key in this._fragments) { if (fragment = this._fragments[key]) { fragment.adapterDidCommit(); } } // Transition directly to a clean state this.transitionTo('saved'); },
export default Ember.Component.extend({ uiState: Ember.inject.service(), classNames: ['tool-group'], classNameBindings: ['collapsed'], onClose: false, collapsible: true, collapsed: false, selected: null, init() { this._super(); const id = this.get('elementId'); Ember.mixin(this, { selected: Ember.computed.alias('uiState.selectedTools.' + id), collapsed: Ember.computed.alias('uiState.collapsedPanels.' + id) }); }, actions: { close() { if (this.attrs.onClose) { this.attrs.onClose(); } }, selectTab(toolId) { this.setProperties({ selected: toolId, collapsed: false }); },