fix deprecations

This commit is contained in:
Rimian Perkins 2019-08-28 18:24:55 +10:00
parent e539c34653
commit 9b2ca50671
2 changed files with 39 additions and 36 deletions

View File

@ -179,11 +179,11 @@ export default Ember.Component.extend({
didInsertElement() {
this._super();
this.get("card").mount("#card-element");
Ember.$(document).on("click", Ember.run.bind(this, this.documentClick));
jQuery(document).on("click", Ember.run.bind(this, this.documentClick));
},
willDestroyElement() {
Ember.$(document).off("click", Ember.run.bind(this, this.documentClick));
jQuery(document).off("click", Ember.run.bind(this, this.documentClick));
},
documentClick(e) {

View File

@ -6,7 +6,8 @@ export default {
const siteSettings = container.lookup("site-settings:main");
withPluginApi("0.8.12", api => {
api.decorateCooked($post => {
api.decorateCooked(
$post => {
const $form = $post.find(".stripe-checkout");
if ($form.length) {
const $input = $form.find("input");
@ -39,7 +40,9 @@ export default {
);
$form.append(s);
}
});
},
{ id: "discourse-donations" }
);
if (siteSettings.discourse_donations_cause_category) {
api.decorateWidget("category-header-widget:after", helper => {