2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 10:50:21 +08:00

Reapply Ember 2.10 for good this time!

This reverts commit ddd299f4aa.
This commit is contained in:
Robin Ward 2016-12-19 11:19:10 -05:00
parent 5058911a7b
commit e03d5e2140
101 changed files with 1867 additions and 1274 deletions

View file

@ -11,6 +11,7 @@ import { translations } from 'pretty-text/emoji/data';
import { emojiSearch } from 'pretty-text/emoji';
import { emojiUrlFor } from 'discourse/lib/text';
import { getRegister } from 'discourse-common/lib/get-owner';
import { findRawTemplate } from 'discourse/lib/raw-templates';
import deprecated from 'discourse-common/lib/deprecated';
// Our head can be a static string or a function that returns a string
@ -297,11 +298,10 @@ export default Ember.Component.extend({
},
_applyCategoryHashtagAutocomplete() {
const template = this.register.lookup('template:category-tag-autocomplete.raw');
const siteSettings = this.siteSettings;
this.$('.d-editor-input').autocomplete({
template: template,
template: findRawTemplate('category-tag-autocomplete'),
key: '#',
transformComplete(obj) {
if (obj.model) {
@ -323,11 +323,10 @@ export default Ember.Component.extend({
if (!this.siteSettings.enable_emoji) { return; }
const register = this.register;
const template = this.register.lookup('template:emoji-selector-autocomplete.raw');
const self = this;
$editorInput.autocomplete({
template: template,
template: findRawTemplate('emoji-selector-autocomplete'),
key: ":",
afterComplete(text) {
self.set('value', text);