DEV: s/this._super()/this._super(...arguments) (#6908)

This commit is contained in:
Joffrey JAFFEUX 2019-01-19 10:05:51 +01:00 committed by GitHub
parent 61fff098ed
commit 502b1316d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
111 changed files with 174 additions and 151 deletions

View File

@ -17,3 +17,26 @@ has_non_en_locales_changes = locales_changes.grep_v(/config\/locales\/(client|se
if locales_changes.any? && has_non_en_locales_changes
fail("Please submit your non-English translation updates via [Transifex](https://www.transifex.com/discourse/discourse-org/). You can read more on how to contribute translations [here](https://meta.discourse.org/t/contribute-a-translation-to-discourse/14882).")
end
files = (git.added_files + git.modified_files)
.reject! { |path| path.start_with?("plugins/") }
.reject! { |path| !(path.end_with?("es6") || path.end_with?("rb")) }
super_offenses = []
files.each do |path|
diff = git.diff_for_file(path)
next if !diff
diff.patch.lines.grep(/^\+\s\s/).each do |added_line|
super_offenses << path if added_line['this._super()']
end
end
if !super_offenses.empty?
warn(%{
When possible use `this._super(...arguments)` instead of `this._super()`\n
#{super_offenses.uniq.map { |o| github.html_link(o) }.join("\n")}
})
end

View File

@ -91,14 +91,14 @@ GEM
crack (0.4.3)
safe_yaml (~> 1.0.0)
crass (1.0.4)
danger (5.6.3)
danger (5.11.1)
claide (~> 1.0)
claide-plugins (>= 0.9.2)
colored2 (~> 3.1)
cork (~> 0.1)
faraday (~> 0.9)
faraday-http-cache (~> 1.0)
git (~> 1)
git (~> 1.5)
kramdown (~> 1.5)
no_proxy_fix
octokit (~> 4.7)
@ -148,7 +148,7 @@ GEM
thor (~> 0.19.1)
fspath (3.1.0)
gc_tracer (1.5.1)
git (1.4.0)
git (1.5.0)
globalid (0.4.1)
activesupport (>= 4.2.0)
guess_html_encoding (0.0.11)
@ -229,7 +229,7 @@ GEM
multi_json (~> 1.3)
multi_xml (~> 0.5)
rack (>= 1.2, < 3)
octokit (4.9.0)
octokit (4.13.0)
sawyer (~> 0.8.0, >= 0.5.3)
oj (3.6.2)
omniauth (1.9.0)
@ -284,7 +284,7 @@ GEM
pry (>= 0.9.10, < 0.11.0)
pry-rails (0.3.6)
pry (>= 0.10.4)
public_suffix (3.0.2)
public_suffix (3.0.3)
puma (3.11.4)
r2 (0.2.7)
rack (2.0.6)

View File

@ -67,7 +67,7 @@ export default Ember.Component.extend({
},
didInsertElement() {
this._super();
this._super(...arguments);
loadScript("/javascripts/ace/ace.js").then(() => {
window.ace.require(["ace/ace"], loadedAce => {

View File

@ -9,7 +9,7 @@ export default Ember.Component.extend(
classNames: ["admin-backups-logs"],
init() {
this._super();
this._super(...arguments);
this._reset();
},

View File

@ -311,7 +311,7 @@ export default Ember.Component.extend({
},
_fetchReport() {
this._super();
this._super(...arguments);
this.setProperties({ isLoading: true, rateLimitationString: null });

View File

@ -1,11 +1,11 @@
export default Ember.Component.extend({
didInsertElement() {
this._super();
this._super(...arguments);
$("body").addClass("admin-interface");
},
willDestroyElement() {
this._super();
this._super(...arguments);
$("body").removeClass("admin-interface");
}
});

View File

@ -8,7 +8,7 @@ export default Ember.Component.extend({
},
didInsertElement() {
this._super();
this._super(...arguments);
this.$().on("click.discourse-staff-logs", "[data-link-post-id]", e => {
let postId = $(e.target).attr("data-link-post-id");

View File

@ -1,6 +1,6 @@
const ColorSchemeColor = Discourse.Model.extend({
init: function() {
this._super();
this._super(...arguments);
this.startTrackingChanges();
},

View File

@ -3,7 +3,7 @@ import ColorSchemeColor from "admin/models/color-scheme-color";
const ColorScheme = Discourse.Model.extend(Ember.Copyable, {
init: function() {
this._super();
this._super(...arguments);
this.startTrackingChanges();
},

View File

@ -10,7 +10,7 @@ import { getOwner } from "discourse-common/lib/get-owner";
export default Ember.Service.extend({
init() {
this._super();
this._super(...arguments);
// TODO: Make `siteSettings` a service that can be injected
this.siteSettings = getOwner(this).lookup("site-settings:main");

View File

@ -28,14 +28,14 @@ export function bufferedRender(obj) {
const caller = {};
caller.didRender = function() {
this._super();
this._super(...arguments);
this._customRender();
};
const triggers = obj.rerenderTriggers;
if (triggers) {
caller.init = function() {
this._super();
this._super(...arguments);
triggers.forEach(k => this.addObserver(k, this.rerenderBuffer));
};
}

View File

@ -4,7 +4,7 @@ export default Ember.Component.extend({
_slug: null,
didInsertElement() {
this._super();
this._super(...arguments);
this.refreshClass();
},
@ -31,7 +31,7 @@ export default Ember.Component.extend({
},
willDestroyElement() {
this._super();
this._super(...arguments);
this._removeClass();
}
});

View File

@ -23,7 +23,7 @@ export default Ember.Component.extend({
},
didRender() {
this._super();
this._super(...arguments);
const $backupCodes = this.$("#backupCodes");
if ($backupCodes.length) {

View File

@ -23,7 +23,7 @@ export default Ember.Component.extend({
},
init() {
this._super();
this._super(...arguments);
const topicList = this.get("topicList");
if (topicList) {
this._initFromTopicList(topicList);

View File

@ -85,7 +85,7 @@ export default Ember.Component.extend(KeyEnterEscape, {
},
didInsertElement() {
this._super();
this._super(...arguments);
const $replyControl = $("#reply-control");
const resize = () => Ember.run(() => this.resize());
@ -112,7 +112,7 @@ export default Ember.Component.extend(KeyEnterEscape, {
},
willDestroyElement() {
this._super();
this._super(...arguments);
this.appEvents.off("composer:resize", this, this.resize);
},

View File

@ -10,7 +10,7 @@ export default Ember.Component.extend({
},
didInsertElement() {
this._super();
this._super(...arguments);
this.$().show();
},

View File

@ -16,7 +16,7 @@ export default Ember.Component.extend({
hidden: Ember.computed.not("composer.viewOpenOrFullscreen"),
didInsertElement() {
this._super();
this._super(...arguments);
this.appEvents.on("composer:typed-reply", this, this._typedReply);
this.appEvents.on("composer:opened", this, this._findMessages);
this.appEvents.on("composer:find-similar", this, this._findSimilar);

View File

@ -12,7 +12,7 @@ export default Ember.Component.extend({
watchForLink: Ember.computed.alias("composer.canEditTopicFeaturedLink"),
didInsertElement() {
this._super();
this._super(...arguments);
if (this.get("focusTarget") === "title") {
const $input = this.$("input");

View File

@ -9,7 +9,7 @@ export default Ember.Component.extend({
defaultUsernameCount: 0,
didInsertElement() {
this._super();
this._super(...arguments);
if (this.get("focusTarget") === "usernames") {
this.$("input").putCursorAtEnd();

View File

@ -2,7 +2,7 @@ export default Ember.Component.extend({
classNames: ["create-account"],
didInsertElement() {
this._super();
this._super(...arguments);
if ($.cookie("email")) {
this.set("email", $.cookie("email"));
@ -19,7 +19,7 @@ export default Ember.Component.extend({
},
willDestroyElement() {
this._super();
this._super(...arguments);
this.$().off("keydown.discourse-create-account");
}
});

View File

@ -14,7 +14,7 @@ export default Ember.Component.extend({
requiredPosts: Ember.computed.alias("siteSettings.tl1_requires_read_posts"),
init() {
this._super();
this._super(...arguments);
if (this.get("shouldSee")) {
let topicCount = 0,
postCount = 0;

View File

@ -5,7 +5,7 @@ export default Ember.Component.extend({
triggerAppEvent: null,
init() {
this._super();
this._super(...arguments);
const name = this.get("name");
const html = getCustomHTML(name);
@ -21,14 +21,14 @@ export default Ember.Component.extend({
},
didInsertElement() {
this._super();
this._super(...arguments);
if (this.get("triggerAppEvent") === "true") {
this.appEvents.trigger(`inserted-custom-html:${this.get("name")}`);
}
},
willDestroyElement() {
this._super();
this._super(...arguments);
if (this.get("triggerAppEvent") === "true") {
this.appEvents.trigger(`destroyed-custom-html:${this.get("name")}`);
}

View File

@ -4,7 +4,7 @@ export default Ember.Component.extend({
dismissable: true,
didInsertElement() {
this._super();
this._super(...arguments);
$("#modal-alert").hide();
let fixedParent = this.$().closest(".d-modal.fixed-modal");
@ -19,7 +19,7 @@ export default Ember.Component.extend({
},
willDestroyElement() {
this._super();
this._super(...arguments);
this.appEvents.off("modal-body:flash");
this.appEvents.off("modal-body:clearFlash");
},

View File

@ -5,7 +5,7 @@ export default Ember.Component.extend({
tagName: "section",
didInsertElement() {
this._super();
this._super(...arguments);
const pageClass = this.get("pageClass");
if (pageClass) {
@ -25,7 +25,7 @@ export default Ember.Component.extend({
},
willDestroyElement() {
this._super();
this._super(...arguments);
const pageClass = this.get("pageClass");
if (pageClass) {
$("body").removeClass(`${pageClass}-page`);

View File

@ -48,7 +48,7 @@ export default Ember.Component.extend(AddArchetypeClass, Scrolling, {
},
didInsertElement() {
this._super();
this._super(...arguments);
this.bindScrolling({ name: "topic-view" });
$(window).on("resize.discourse-on-scroll", () => this.scrolled());
@ -117,7 +117,7 @@ export default Ember.Component.extend(AddArchetypeClass, Scrolling, {
},
willDestroyElement() {
this._super();
this._super(...arguments);
this.unbindScrolling("topic-view");
$(window).unbind("resize.discourse-on-scroll");

View File

@ -32,7 +32,7 @@ const DiscoveryTopicsListComponent = Ember.Component.extend(
},
scrolled() {
this._super();
this._super(...arguments);
this.saveScrollPosition();
},

View File

@ -15,7 +15,7 @@ export default Ember.Component.extend({
}.property("tab"),
didInsertElement() {
this._super();
this._super(...arguments);
Ember.run.scheduleOnce("afterRender", this, this._addToCollection);
},

View File

@ -18,7 +18,7 @@ export default Ember.Component.extend({
displayLabel: null,
init() {
this._super();
this._super(...arguments);
const input = this.get("input");

View File

@ -1,6 +1,6 @@
export default Ember.Component.extend({
didInsertElement() {
this._super();
this._super(...arguments);
this.$("input")
.select()
.focus();

View File

@ -55,7 +55,7 @@ export default Ember.Component.extend(CardContentsBase, CleansUp, {
},
_close() {
this._super();
this._super(...arguments);
this.set("group", null);
},

View File

@ -11,7 +11,7 @@ export default Ember.Component.extend({
nameInput: null,
didInsertElement() {
this._super();
this._super(...arguments);
const name = this.get("model.name");
if (name) {

View File

@ -1,6 +1,6 @@
export default Ember.Component.extend({
didInsertElement() {
this._super();
this._super(...arguments);
$(".d-modal.fixed-modal")
.modal("hide")
.addClass("hidden");

View File

@ -3,7 +3,7 @@ import { selectedText } from "discourse/lib/utilities";
export default Ember.Component.extend({
didInsertElement() {
this._super();
this._super(...arguments);
this.$().on("mouseup.discourse-redirect", "#revisions a", function(e) {
// bypass if we are selecting stuff
@ -27,7 +27,7 @@ export default Ember.Component.extend({
},
willDestroyElement() {
this._super();
this._super(...arguments);
this.$().off("mouseup.discourse-redirect", "#revisions a");
}
});

View File

@ -1,6 +1,6 @@
export default Ember.Component.extend({
didInsertElement() {
this._super();
this._super(...arguments);
const prefillUsername = $("#hidden-login-form input[name=username]").val();
if (prefillUsername) {

View File

@ -21,7 +21,7 @@ export default Ember.Component.extend({
dirtyKeys: null,
init() {
this._super();
this._super(...arguments);
const name = this.get("widget");
this.register = getRegister(this);

View File

@ -11,7 +11,7 @@ export default Ember.Component.extend({
elementId: "navigation-bar",
init() {
this._super();
this._super(...arguments);
this.set("connectors", renderedConnectorsFor("extra-nav-item", null, this));
},

View File

@ -46,7 +46,7 @@ export default DesktopNotificationConfig.extend({
actions: {
turnon() {
this._super();
this._super(...arguments);
this.set("bannerDismissed", true);
},
dismiss() {

View File

@ -2,7 +2,7 @@ import { observes } from "ember-addons/ember-computed-decorators";
export default Ember.Component.extend({
init() {
this._super();
this._super(...arguments);
const connector = this.get("connector");
this.set("layoutName", connector.templateName);

View File

@ -42,7 +42,7 @@ export default Ember.Component.extend({
this.set("connectorTagName", "");
}
this._super();
this._super(...arguments);
const name = this.get("name");
if (name) {
const args = this.get("args");

View File

@ -2,19 +2,19 @@ import Scrolling from "discourse/mixins/scrolling";
export default Ember.Component.extend(Scrolling, {
didReceiveAttrs() {
this._super();
this._super(...arguments);
this.set("trackerName", `scroll-tracker-${this.get("name")}`);
},
didInsertElement() {
this._super();
this._super(...arguments);
this.bindScrolling({ name: this.get("name") });
},
didRender() {
this._super();
this._super(...arguments);
const data = this.session.get(this.get("trackerName"));
if (data && data.position >= 0 && data.tag === this.get("tag")) {
@ -23,13 +23,13 @@ export default Ember.Component.extend(Scrolling, {
},
willDestroyElement() {
this._super();
this._super(...arguments);
this.unbindScrolling(this.get("name"));
},
scrolled() {
this._super();
this._super(...arguments);
this.session.set(this.get("trackerName"), {
position: $(window).scrollTop(),

View File

@ -263,7 +263,7 @@ export default MountWidget.extend({
},
didInsertElement() {
this._super();
this._super(...arguments);
const debouncedScroll = () =>
Ember.run.debounce(this, this._scrollTriggered, 10);
@ -313,7 +313,7 @@ export default MountWidget.extend({
},
willDestroyElement() {
this._super();
this._super(...arguments);
$(document).unbind("touchmove.post-stream");
$(window).unbind("scroll.post-stream");
this.appEvents.off("post-stream:refresh");

View File

@ -64,7 +64,7 @@ export default Ember.Component.extend({
],
init() {
this._super();
this._super(...arguments);
this._init();
Ember.run.scheduleOnce("afterRender", () => {
this._update();

View File

@ -93,7 +93,7 @@ export default Ember.Component.extend({
},
didInsertElement() {
this._super();
this._super(...arguments);
const $html = $("html");
$html.on("mousedown.outside-share-link", e => {
@ -152,7 +152,7 @@ export default Ember.Component.extend({
},
willDestroyElement() {
this._super();
this._super(...arguments);
$("html")
.off("click.discourse-share-link")
.off("mousedown.outside-share-link")

View File

@ -225,7 +225,7 @@ const SiteHeaderComponent = MountWidget.extend(Docking, PanEvents, {
},
didInsertElement() {
this._super();
this._super(...arguments);
$(window).on("resize.discourse-menu-panel", () => this.afterRender());
this.appEvents.on("header:show-topic", topic => this.setTopic(topic));
@ -252,7 +252,7 @@ const SiteHeaderComponent = MountWidget.extend(Docking, PanEvents, {
},
willDestroyElement() {
this._super();
this._super(...arguments);
$("body").off("keydown.header");
$(window).off("resize.discourse-menu-panel");

View File

@ -1,6 +1,6 @@
export default Ember.Component.extend({
didInsertElement() {
this._super();
this._super(...arguments);
Ember.run.next(null, () => {
this.$()
.find("hr")

View File

@ -52,7 +52,7 @@ export default Ember.Component.extend(CleansUp, {
bottomDate: (bumpedDate, showTime) => entranceDate(bumpedDate, showTime),
didInsertElement() {
this._super();
this._super(...arguments);
this.appEvents.on("topic-entrance:show", data => this._show(data));
},

View File

@ -12,7 +12,7 @@ export default Ember.Component.extend(PanEvents, {
isPanning: false,
init() {
this._super();
this._super(...arguments);
this.set("info", Ember.Object.create());
},
@ -176,7 +176,7 @@ export default Ember.Component.extend(PanEvents, {
},
didInsertElement() {
this._super();
this._super(...arguments);
this.appEvents
.on("topic:current-post-scrolled", this, this._topicScrolled)
@ -198,7 +198,7 @@ export default Ember.Component.extend(PanEvents, {
},
willDestroyElement() {
this._super();
this._super(...arguments);
this.appEvents
.off("topic:current-post-scrolled", this, this._topicScrolled)

View File

@ -89,7 +89,7 @@ export default Ember.Component.extend({
},
didInsertElement() {
this._super();
this._super(...arguments);
this.appEvents
.on("composer:will-open", this, this._dock)
@ -113,7 +113,7 @@ export default Ember.Component.extend({
},
willDestroyElement() {
this._super();
this._super(...arguments);
this.appEvents
.off("composer:will-open", this, this._dock)
.off("composer:resized", this, this._dock)

View File

@ -83,7 +83,7 @@ export default MountWidget.extend(Docking, {
},
didInsertElement() {
this._super();
this._super(...arguments);
if (this.get("fullscreen") && !this.get("addShowClass")) {
Ember.run.next(() => {

View File

@ -158,11 +158,11 @@ export default Ember.Component.extend(
},
didInsertElement() {
this._super();
this._super(...arguments);
},
_close() {
this._super();
this._super(...arguments);
this.setProperties({
user: null,
topicPostCount: null

View File

@ -5,7 +5,7 @@ export default MountWidget.extend({
widget: "user-notifications-large",
init() {
this._super();
this._super(...arguments);
this.args = { notifications: this.get("notifications") };
},

View File

@ -15,7 +15,7 @@ export default TextField.extend({
},
didInsertElement(opts) {
this._super();
this._super(...arguments);
const bool = n => {
const val = this.get(n);
@ -106,7 +106,7 @@ export default TextField.extend({
},
willDestroyElement() {
this._super();
this._super(...arguments);
this.$().autocomplete("destroy");
},

View File

@ -2,7 +2,7 @@ import isElementInViewport from "discourse/lib/is-element-in-viewport";
export default Ember.Component.extend({
didInsertElement() {
this._super();
this._super(...arguments);
const currentUser = this.currentUser;
if (!currentUser) {
return;
@ -20,7 +20,7 @@ export default Ember.Component.extend({
},
willDestroyElement() {
this._super();
this._super(...arguments);
$(window).off("load.faq resize.faq scroll.faq");
}
});

View File

@ -10,7 +10,7 @@ export default Ember.Controller.extend({
application: Ember.inject.controller(),
init() {
this._super();
this._super(...arguments);
this.set("filters", Ember.Object.create());
},

View File

@ -2,7 +2,7 @@ import { default as computed } from "ember-addons/ember-computed-decorators";
const Tab = Ember.Object.extend({
init() {
this._super();
this._super(...arguments);
let name = this.get("name");
this.set("route", this.get("route") || `group.` + name);
this.set("message", I18n.t(`groups.${this.get("i18nKey") || name}`));

View File

@ -107,7 +107,7 @@ export default Ember.Controller.extend(bufferedProperty("model"), {
},
init() {
this._super();
this._super(...arguments);
this.appEvents.on("post:show-revision", (postNumber, revision) => {
const post = this.model.get("postStream").postForPostNumber(postNumber);
if (!post) {

View File

@ -15,7 +15,7 @@ export default Ember.Controller.extend({
rescindedAll: false,
init: function() {
this._super();
this._super(...arguments);
this.set("searchTerm", "");
},

View File

@ -22,7 +22,7 @@ export default function(page) {
},
activate() {
this._super();
this._super(...arguments);
jumpToElement(document.location.hash.substr(1));
},

View File

@ -22,7 +22,7 @@ export default {
},
willDestroyElement() {
this._super();
this._super(...arguments);
this._cleanUp();
}
};

View File

@ -67,7 +67,7 @@ export default Ember.Mixin.create({
},
didInsertElement() {
this._super();
this._super(...arguments);
afterTransition(this.$(), this._hide.bind(this));
const id = this.get("elementId");
const triggeringLinkClass = this.get("triggeringLinkClass");
@ -226,7 +226,7 @@ export default Ember.Mixin.create({
},
willDestroyElement() {
this._super();
this._super(...arguments);
const clickOutsideEventName = this.get("clickOutsideEventName");
const clickDataExpand = this.get("clickDataExpand");
const clickMention = this.get("clickMention");

View File

@ -10,7 +10,7 @@ export default Ember.Mixin.create({
queueDockCheck: null,
init() {
this._super();
this._super(...arguments);
this.queueDockCheck = () => {
Ember.run.debounce(this, this.safeDockCheck, 5);
};
@ -24,7 +24,7 @@ export default Ember.Mixin.create({
},
didInsertElement() {
this._super();
this._super(...arguments);
$(window).bind("scroll.discourse-dock", this.queueDockCheck);
$(document).bind("touchmove.discourse-dock", this.queueDockCheck);
@ -33,7 +33,7 @@ export default Ember.Mixin.create({
},
willDestroyElement() {
this._super();
this._super(...arguments);
$(window).unbind("scroll.discourse-dock", this.queueDockCheck);
$(document).unbind("touchmove.discourse-dock", this.queueDockCheck);
}

View File

@ -11,7 +11,7 @@ export default Ember.Mixin.create({
_panState: null,
didInsertElement() {
this._super();
this._super(...arguments);
if (this.site.mobileView) {
if ("onpointerdown" in document.documentElement) {
@ -35,7 +35,7 @@ export default Ember.Mixin.create({
},
willDestroyElement() {
this._super();
this._super(...arguments);
if (this.site.mobileView) {
this.$()

View File

@ -5,7 +5,7 @@ export default Ember.Mixin.create({
rejectedPasswords: null,
init() {
this._super();
this._super(...arguments);
this.set("rejectedPasswords", []);
this.set("rejectedPasswordsMessages", new Map());
},

View File

@ -22,7 +22,7 @@ export default Ember.Mixin.create({
deprecated(
"The `ScrollTop` mixin is deprecated. Replace it with a `{{d-section}}` component"
);
this._super();
this._super(...arguments);
scrollTop();
}
});

View File

@ -4,7 +4,7 @@ import { ajax } from "discourse/lib/ajax";
const CategoryList = Ember.ArrayProxy.extend({
init() {
this.set("content", []);
this._super();
this._super(...arguments);
}
});

View File

@ -52,7 +52,7 @@ export default Ember.Object.extend({
},
init() {
this._super();
this._super(...arguments);
this.register = this.register || getRegister(this);
},

View File

@ -14,7 +14,7 @@ export default RestModel.extend({
loaded: false,
init() {
this._super();
this._super(...arguments);
this.setProperties({
itemsLoaded: 0,
content: [],

View File

@ -56,7 +56,7 @@ export default {
willTransition() {
Discourse.User.currentProp("should_be_redirected_to_top", false);
Discourse.User.currentProp("redirected_to_top.reason", null);
return this._super();
return this._super(...arguments);
}
}
});

View File

@ -48,7 +48,7 @@ const ApplicationRoute = Discourse.Route.extend(OpenComposer, {
willTransition() {
var router = getOwner(this).lookup("router:main");
Ember.run.once(router, router.trigger, "willTransition");
return this._super();
return this._super(...arguments);
},
postWasEnqueued(details) {
@ -206,7 +206,7 @@ const ApplicationRoute = Discourse.Route.extend(OpenComposer, {
},
activate() {
this._super();
this._super(...arguments);
Ember.run.next(function() {
// Support for callbacks once the application has activated
ApplicationRoute.trigger("activate");

View File

@ -185,7 +185,7 @@ export default (filterArg, params) => {
},
deactivate() {
this._super();
this._super(...arguments);
this.searchService.set("searchContext", null);
},

View File

@ -9,7 +9,7 @@ const DiscourseRoute = Ember.Route.extend({
resfreshQueryWithoutTransition: false,
activate() {
this._super();
this._super(...arguments);
if (this.get("showFooter")) {
this.controllerFor("application").set("showFooter", true);
}
@ -17,7 +17,7 @@ const DiscourseRoute = Ember.Route.extend({
refresh() {
if (!this.refreshQueryWithoutTransition) {
return this._super();
return this._super(...arguments);
}
const router = getOwner(this).lookup("router:main");

View File

@ -17,7 +17,7 @@ export default RestrictedUserRoute.extend({
// A bit odd, but if we leave to /preferences we need to re-render that outlet
deactivate: function() {
this._super();
this._super(...arguments);
this.render("preferences", { into: "user", controller: "preferences" });
},

View File

@ -18,7 +18,7 @@ export default RestrictedUserRoute.extend({
// A bit odd, but if we leave to /preferences we need to re-render that outlet
deactivate: function() {
this._super();
this._super(...arguments);
this.render("preferences", { into: "user", controller: "preferences" });
}
});

View File

@ -13,7 +13,7 @@ export default RestrictedUserRoute.extend({
// A bit odd, but if we leave to /preferences we need to re-render that outlet
deactivate: function() {
this._super();
this._super(...arguments);
this.render("preferences", { into: "user", controller: "preferences" });
},

View File

@ -9,7 +9,7 @@ export default Discourse.Route.extend({
},
deactivate() {
this._super();
this._super(...arguments);
this.controllerFor("topic").unsubscribe();
},

View File

@ -165,7 +165,7 @@ const TopicRoute = Discourse.Route.extend({
},
willTransition() {
this._super();
this._super(...arguments);
Ember.run.cancel(scheduledReplace);
isTransitioning = true;
return true;
@ -227,7 +227,7 @@ const TopicRoute = Discourse.Route.extend({
},
activate() {
this._super();
this._super(...arguments);
isTransitioning = false;
const topic = this.modelFor("topic");
@ -235,7 +235,7 @@ const TopicRoute = Discourse.Route.extend({
},
deactivate() {
this._super();
this._super(...arguments);
this.searchService.set("searchContext", null);
this.controllerFor("user-card").set("visible", false);

View File

@ -28,7 +28,7 @@ export default Discourse.Route.extend({
actions: {
willTransition: function() {
this._super();
this._super(...arguments);
this.controllerFor("user").set("pmView", null);
return true;
}

View File

@ -68,7 +68,7 @@ export default Discourse.Route.extend({
},
activate() {
this._super();
this._super(...arguments);
const user = this.modelFor("user");
this.messageBus.subscribe("/u/" + user.get("username_lower"), function(
data
@ -78,7 +78,7 @@ export default Discourse.Route.extend({
},
deactivate() {
this._super();
this._super(...arguments);
this.messageBus.unsubscribe(
"/u/" + this.modelFor("user").get("username_lower")
);

View File

@ -10,7 +10,7 @@ export default DropdownSelectBox.extend({
headerIcon: "thumbs-o-up",
computeHeaderContent() {
let content = this._super();
let content = this._super(...arguments);
content.name = `${I18n.t("admin.flags.agree")}...`;
return content;
},

View File

@ -9,7 +9,7 @@ export default DropdownSelectBox.extend({
headerIcon: "trash-o",
computeHeaderContent() {
let content = this._super();
let content = this._super(...arguments);
content.name = `${I18n.t("admin.flags.delete")}...`;
return content;
},

View File

@ -18,7 +18,7 @@ export default ComboBoxComponent.extend({
permissionType: PermissionType.FULL,
init() {
this._super();
this._super(...arguments);
this.get("rowComponentOptions").setProperties({
allowUncategorized: this.get("allowUncategorized")
@ -71,7 +71,7 @@ export default ComboBoxComponent.extend({
},
computeHeaderContent() {
let content = this._super();
let content = this._super(...arguments);
if (this.get("hasSelection")) {
const category = Category.findById(content.value);

View File

@ -80,7 +80,7 @@ export default ComboBoxComponent.extend({
},
computeHeaderContent() {
let content = this._super();
let content = this._super(...arguments);
if (this.get("hasSelection")) {
const category = Category.findById(content.value);

View File

@ -55,7 +55,7 @@ export default ComboBoxSelectBoxHeaderComponent.extend({
},
didRender() {
this._super();
this._super(...arguments);
this.$().attr("style", this.get("categoryStyle"));
this.$(".caret-icon").attr("style", this.get("categoryStyle"));

View File

@ -12,7 +12,7 @@ export default MultiSelectComponent.extend({
allowUncategorized: true,
init() {
this._super();
this._super(...arguments);
if (!this.get("categories")) this.set("categories", []);
if (!this.get("blacklist")) this.set("blacklist", []);

View File

@ -15,7 +15,7 @@ export default SingleSelectComponent.extend({
clearable: false,
computeHeaderContent() {
let content = this._super();
let content = this._super(...arguments);
content.hasSelection = this.get("hasSelection");
return content;
},

View File

@ -30,7 +30,7 @@ export default DropdownSelectBoxComponent.extend({
isHidden: Ember.computed.empty("content"),
didReceiveAttrs() {
this._super();
this._super(...arguments);
// if we change topic we want to change both snapshots
if (
@ -53,7 +53,7 @@ export default DropdownSelectBoxComponent.extend({
},
computeHeaderContent() {
let content = this._super();
let content = this._super(...arguments);
switch (this.get("action")) {
case PRIVATE_MESSAGE:

View File

@ -26,7 +26,7 @@ export default SingleSelectComponent.extend({
},
didSelect() {
this._super();
this._super(...arguments);
this.close();
}
});

View File

@ -169,7 +169,7 @@ export default ComboBoxComponent.extend(DatetimeMixin, {
"future-date-input-selector/future-date-input-selector-header",
computeHeaderContent() {
let content = this._super();
let content = this._super(...arguments);
content.datetime = this._computeDatetimeForValue(this.get("computedValue"));
content.name = this.get("selection.name") || content.name;
content.hasSelection = this.get("hasSelection");

View File

@ -18,7 +18,7 @@ export default ComboBoxComponent.extend({
},
computeHeaderContent() {
let content = this._super();
let content = this._super(...arguments);
if (!this.get("hasSelection")) {
content.label = `<span>${I18n.t("groups.index.all")}</span>`;

View File

@ -10,7 +10,7 @@ export default MultiSelectComponent.extend({
filterable: true,
init() {
this._super();
this._super(...arguments);
if (!isNone(this.get("settingName"))) {
this.set("nameProperty", this.get("settingName"));

View File

@ -136,7 +136,7 @@ export default ComboBox.extend(TagsMixin, {
},
computeHeaderContent() {
let content = this._super();
let content = this._super(...arguments);
const joinedTags = this.get("selection")
.map(s => Ember.get(s, "value"))

View File

@ -23,7 +23,7 @@ export default SelectKitComponent.extend({
values: null,
init() {
this._super();
this._super(...arguments);
this.set("computedValues", []);

View File

@ -37,7 +37,7 @@ export default DropdownSelectBoxComponent.extend({
iconForSelectedDetails: Ember.computed.alias("selectedDetails.icon"),
computeHeaderContent() {
let content = this._super();
let content = this._super(...arguments);
content.name = I18n.t(
`${this.get("i18nPrefix")}.${this.get("selectedDetails.key")}${this.get(
"i18nPostfix"

View File

@ -10,7 +10,7 @@ export default DropdownSelectBoxComponent.extend({
autoHighlight() {},
computeHeaderContent() {
let content = this._super();
let content = this._super(...arguments);
const pinnedGlobally = this.get("topic.pinned_globally");
const pinned = this.get("computedValue");
const globally = pinnedGlobally ? "_globally" : "";

View File

@ -11,7 +11,7 @@ export default CategoryChooserComponent.extend({
permissionType: null,
init() {
this._super();
this._super(...arguments);
this.get("rowComponentOptions").setProperties({
displayCategoryDescription: false

View File

@ -16,7 +16,7 @@ export default MultiSelectComponent.extend(TagsMixin, {
allowAny: Ember.computed.alias("allowCreate"),
init() {
this._super();
this._super(...arguments);
if (this.get("allowCreate") !== false) {
this.set("allowCreate", this.site.get("can_create_tag"));

View File

@ -42,7 +42,7 @@ export default ComboBoxComponent.extend(TagsMixin, {
},
computeHeaderContent() {
let content = this._super();
let content = this._super(...arguments);
if (!content.value) {
if (this.get("tagId")) {

View File

@ -14,7 +14,7 @@ export default MultiSelectComponent.extend(TagsMixin, {
allowAny: false,
init() {
this._super();
this._super(...arguments);
this.set("templateForRow", rowComponent => {
const tag = rowComponent.get("computedContent");

View File

@ -8,7 +8,7 @@ export default ComboBoxComponent.extend({
allowInitialValueMutation: false,
computeHeaderContent() {
let content = this._super();
let content = this._super(...arguments);
content.name = I18n.t("topic.controls");
return content;
},

View File

@ -2,7 +2,7 @@ import { on } from "ember-addons/ember-computed-decorators";
export default Ember.Mixin.create({
init() {
this._super();
this._super(...arguments);
this._previousScrollParentOverflow = null;
this._previousCSSContext = null;

Some files were not shown because too many files have changed in this diff Show More