Create CW-version of site singleton
Dieser Commit ist enthalten in:
Ursprung
454872edc8
Commit
841923b79c
2 geänderte Dateien mit 11 neuen und 1 gelöschten Zeilen
|
@ -23,7 +23,7 @@ export default {
|
||||||
const Store = requirejs("discourse/models/store").default;
|
const Store = requirejs("discourse/models/store").default;
|
||||||
const registerRawHelpers = requirejs("discourse-common/lib/raw-handlebars-helpers").registerRawHelpers;
|
const registerRawHelpers = requirejs("discourse-common/lib/raw-handlebars-helpers").registerRawHelpers;
|
||||||
const RawHandlebars = requirejs("discourse-common/lib/raw-handlebars").default;
|
const RawHandlebars = requirejs("discourse-common/lib/raw-handlebars").default;
|
||||||
const Site = requirejs("discourse/models/site").default;
|
const Site = requirejs("discourse/plugins/discourse-custom-wizard/wizard/models/site").default;
|
||||||
const RestAdapter = requirejs("discourse/adapters/rest").default;
|
const RestAdapter = requirejs("discourse/adapters/rest").default;
|
||||||
|
|
||||||
Discourse.Model = EmberObject.extend();
|
Discourse.Model = EmberObject.extend();
|
||||||
|
|
10
assets/javascripts/wizard/models/site.js.es6
Normale Datei
10
assets/javascripts/wizard/models/site.js.es6
Normale Datei
|
@ -0,0 +1,10 @@
|
||||||
|
import Site from "discourse/models/site";
|
||||||
|
|
||||||
|
export default Site.reopenClass({
|
||||||
|
// There is no site data actually loaded by the CW yet. This placeholder is
|
||||||
|
// needed by imported classes
|
||||||
|
createCurrent() {
|
||||||
|
const store = Discourse.__container__.lookup("service:store");
|
||||||
|
return store.createRecord("site", {});
|
||||||
|
},
|
||||||
|
})
|
Laden …
In neuem Issue referenzieren