mirror of
https://github.com/discourse/discourse.git
synced 2025-02-26 05:21:11 +08:00
FIX: Oneboxes weren't being rendered
This commit is contained in:
parent
ba8d40d24b
commit
2f3dc63dd3
@ -49,7 +49,10 @@ Discourse.Onebox = {
|
|||||||
$elem.addClass('loading-onebox');
|
$elem.addClass('loading-onebox');
|
||||||
|
|
||||||
// Retrieve the 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
|
// We can call this when loading is complete
|
||||||
var loadingFinished = function() {
|
var loadingFinished = function() {
|
||||||
|
@ -132,8 +132,8 @@ Discourse.ComposerController = Discourse.Controller.extend({
|
|||||||
// If visible update the text
|
// If visible update the text
|
||||||
var educationKey = this.get('content.creatingTopic') ? 'new-topic' : 'new-reply';
|
var educationKey = this.get('content.creatingTopic') ? 'new-topic' : 'new-reply';
|
||||||
var composerController = this;
|
var composerController = this;
|
||||||
Discourse.ajax("/education/" + educationKey).then(function(result) {
|
Discourse.ajax("/education/" + educationKey, {dataType: 'html'}).then(function(result) {
|
||||||
composerController.set('educationContents', result.responseText);
|
composerController.set('educationContents', result);
|
||||||
});
|
});
|
||||||
}.observes('typedReply', 'content.creatingTopic', 'Discourse.currentUser.reply_count'),
|
}.observes('typedReply', 'content.creatingTopic', 'Discourse.currentUser.reply_count'),
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user