0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-29 12:20:27 +01:00

Add a whole bunch of required objects

Dieser Commit ist enthalten in:
Angus McLeod 2019-11-14 18:28:26 +11:00
Ursprung 468557058e
Commit 833195039b
2 geänderte Dateien mit 21 neuen und 9 gelöschten Zeilen

Datei anzeigen

@ -11,12 +11,15 @@
//= require discourse/lib/page-visible
//= require discourse/lib/logout
//= require discourse/lib/render-tag
//= require discourse/lib/notification-levels
//= require discourse/lib/notification-levels
//= require discourse/lib/computed
//= require markdown-it-bundle
//= require pretty-text/engines/discourse-markdown-it
//= require pretty-text/engines/discourse-markdown/helpers
//= require pretty-text/pretty-text
//= require ember-addons/fmt
//= require preload-store
//= require ./wizard/custom-wizard
//= require_tree ./wizard/components
@ -29,9 +32,15 @@
//= require_tree ./wizard/templates
//= require discourse/models/permission-type
//= require discourse/models/archetype
//= require discourse/models/rest
//= require discourse/models/site
//= require discourse/models/category
//= require discourse/models/session
//= require discourse/models/post-action-type
//= require discourse/models/trust-level
//= require discourse/models/store
//= require discourse/models/result-set
//= require discourse/helpers/category-link
//= require discourse/mixins/singleton

Datei anzeigen

@ -19,6 +19,11 @@ export default {
const cook = requirejs('discourse/plugins/discourse-custom-wizard/wizard/lib/text-lite').cook;
const Singleton = requirejs("discourse/mixins/singleton").default;
const WizardFieldDropdown = requirejs('wizard/components/wizard-field-dropdown').default;
const Store = requirejs("discourse/models/store").default;
Discourse.__container__ = app.__container__;
Discourse.getURLWithCDN = getUrl;
Discourse.getURL = getUrl;
WizardFieldDropdown.reopen({
tagName: 'span',
@ -52,19 +57,17 @@ export default {
const siteSettings = Wizard.SiteSettings;
app.register("site-settings:main", siteSettings, { instantiate: false });
targets.forEach(t => app.inject(t, "siteSettings", "site-settings:main"));
app.register("service:store", Store);
targets.forEach(t => app.inject(t, "store", "service:store"));
const site = Discourse.Site;
app.register("site:main", site);
targets.forEach(t => app.inject(t, "site", "site:main"));
site.reopenClass(Singleton);
site.currentProp('can_create_tag', false);
// this is for discourse/lib/utilities.avatarImg;
Discourse.__container__ = app.__container__;
Discourse.getURLWithCDN = getUrl;
Discourse.getURL = getUrl;
Router.reopen({
rootURL: getUrl('/w/')
});