FIX: Oneboxes weren't being rendered

This commit is contained in:
Robin Ward 2013-05-10 18:50:05 -04:00
parent ba8d40d24b
commit 2f3dc63dd3
2 changed files with 6 additions and 3 deletions

View File

@ -49,7 +49,10 @@ Discourse.Onebox = {
$elem.addClass('loading-onebox');
// Retrieve the onebox
var promise = Discourse.ajax("/onebox", { data: { url: url, refresh: refresh } });
var promise = Discourse.ajax("/onebox", {
dataType: 'html',
data: { url: url, refresh: refresh }
});
// We can call this when loading is complete
var loadingFinished = function() {

View File

@ -132,8 +132,8 @@ Discourse.ComposerController = Discourse.Controller.extend({
// If visible update the text
var educationKey = this.get('content.creatingTopic') ? 'new-topic' : 'new-reply';
var composerController = this;
Discourse.ajax("/education/" + educationKey).then(function(result) {
composerController.set('educationContents', result.responseText);
Discourse.ajax("/education/" + educationKey, {dataType: 'html'}).then(function(result) {
composerController.set('educationContents', result);
});
}.observes('typedReply', 'content.creatingTopic', 'Discourse.currentUser.reply_count'),