mirror of
https://github.com/flarum/framework.git
synced 2024-12-05 00:43:39 +08:00
13 lines
356 B
JavaScript
13 lines
356 B
JavaScript
import Ember from 'ember';
|
|
|
|
export default Ember.View.extend({
|
|
_updateTitle: function() {
|
|
var q = this.get('controller.searchQuery');
|
|
this.get('controller.controllers.application').set('pageTitle', q ? '"'+q+'"' : '');
|
|
}.observes('controller.searchQuery'),
|
|
|
|
didInsertElement: function() {
|
|
this._updateTitle();
|
|
}
|
|
});
|