Fix emoticons: Was not upgraded to use promises
This commit is contained in:
parent
fa27476267
commit
e783891f31
|
@ -40,13 +40,14 @@
|
|||
template: template,
|
||||
key: ":",
|
||||
transformComplete: function(v){ return v + ":"; },
|
||||
dataSource: function(term, callback){
|
||||
dataSource: function(term){
|
||||
|
||||
term = term.toLowerCase();
|
||||
|
||||
if (term == "") {
|
||||
callback(["smile", "smiley", "wink", "sunny", "blush"]);
|
||||
return
|
||||
return Ember.Deferred.promise(function (promise) {
|
||||
promise.resolve(["smile", "smiley", "wink", "sunny", "blush"]);
|
||||
});
|
||||
}
|
||||
|
||||
var options = []
|
||||
|
@ -67,7 +68,9 @@
|
|||
}
|
||||
}
|
||||
|
||||
callback(options)
|
||||
return Ember.Deferred.promise(function (promise) {
|
||||
promise.resolve(options);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue