mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 09:36:19 -05:00
Patch Ember to fix https://github.com/emberjs/ember.js/issues/9805
This commit is contained in:
parent
52f7f8e471
commit
393607d25c
4 changed files with 11 additions and 3 deletions
|
@ -158,11 +158,11 @@ var controllerOpts = {
|
||||||
}.property('allLoaded', 'topics.length'),
|
}.property('allLoaded', 'topics.length'),
|
||||||
|
|
||||||
footerEducation: function() {
|
footerEducation: function() {
|
||||||
if (!this.get('allLoaded') || this.get('topics.length') > 0 || !Discourse.User.current()) { return ""; }
|
if (!this.get('allLoaded') || this.get('topics.length') > 0 || !Discourse.User.current()) { return; }
|
||||||
|
|
||||||
var split = this.get('filter').split('/');
|
var split = this.get('filter').split('/');
|
||||||
|
|
||||||
if (split[0] !== 'new' && split[0] !== 'unread' && split[0] !== 'starred') { return ""; }
|
if (split[0] !== 'new' && split[0] !== 'unread' && split[0] !== 'starred') { return; }
|
||||||
|
|
||||||
return I18n.t("topics.none.educate." + split[0], {
|
return I18n.t("topics.none.educate." + split[0], {
|
||||||
userPrefsUrl: Discourse.getURL("/users/") + (Discourse.User.currentProp("username_lower")) + "/preferences"
|
userPrefsUrl: Discourse.getURL("/users/") + (Discourse.User.currentProp("username_lower")) + "/preferences"
|
||||||
|
|
|
@ -92,7 +92,7 @@ Discourse.User = Discourse.Model.extend({
|
||||||
desc = I18n.t('user.moderator', {user: name});
|
desc = I18n.t('user.moderator', {user: name});
|
||||||
return '<i class="fa fa-shield" title="' + desc + '" alt="' + desc + '"></i>';
|
return '<i class="fa fa-shield" title="' + desc + '" alt="' + desc + '"></i>';
|
||||||
}
|
}
|
||||||
return "";
|
return null;
|
||||||
}.property('admin','moderator'),
|
}.property('admin','moderator'),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -10112,6 +10112,10 @@ enifed("ember-handlebars/string",
|
||||||
@return {Handlebars.SafeString} a string that will not be html escaped by Handlebars
|
@return {Handlebars.SafeString} a string that will not be html escaped by Handlebars
|
||||||
*/
|
*/
|
||||||
function htmlSafe(str) {
|
function htmlSafe(str) {
|
||||||
|
if (str === undefined || str === null) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
if (typeof str !== 'string') {
|
if (typeof str !== 'string') {
|
||||||
str = ''+str;
|
str = ''+str;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9819,6 +9819,10 @@ enifed("ember-handlebars/string",
|
||||||
@return {Handlebars.SafeString} a string that will not be html escaped by Handlebars
|
@return {Handlebars.SafeString} a string that will not be html escaped by Handlebars
|
||||||
*/
|
*/
|
||||||
function htmlSafe(str) {
|
function htmlSafe(str) {
|
||||||
|
if (str === undefined || str === null) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
if (typeof str !== 'string') {
|
if (typeof str !== 'string') {
|
||||||
str = ''+str;
|
str = ''+str;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue