diff --git a/assets/javascripts/wizard-custom.js b/assets/javascripts/wizard-custom.js index cd0b06ae..a57463b5 100644 --- a/assets/javascripts/wizard-custom.js +++ b/assets/javascripts/wizard-custom.js @@ -12,12 +12,15 @@ //= require message-bus //= require_tree_discourse discourse/app/models +//= require discourse/app/controllers/basic-modal-body +//= require discourse/app/controllers/modal //= require discourse/app/helpers/category-link //= require discourse/app/helpers/user-avatar //= require discourse/app/helpers/format-username //= require discourse/app/helpers/share-url //= require discourse/app/helpers/decorate-username-selector +//= require discourse/app/helpers/route-action //= require discourse-common/addon/helpers/component-for-collection //= require discourse-common/addon/helpers/component-for-row //= require discourse-common/addon/lib/raw-templates @@ -39,7 +42,8 @@ //= require discourse/app/components/date-input //= require discourse/app/components/date-time-input //= require discourse/app/components/text-field -//= require discourse/app/components/d-textarea +//= require discourse/app/components/d-textarea +//= require discourse/app/components/d-modal //= require discourse/app/templates/components/conditional-loading-spinner //= require discourse/app/templates/components/d-button @@ -53,6 +57,7 @@ //= require discourse/app/templates/category-tag-autocomplete //= require discourse/app/templates/emoji-selector-autocomplete //= require discourse/app/templates/user-selector-autocomplete +//= require discourse/app/templates/modal //= require discourse/app/initializers/jquery-plugins //= require discourse/app/pre-initializers/sniff-capabilities @@ -81,4 +86,4 @@ //= require_tree ./wizard/lib //= require_tree ./wizard/models //= require_tree ./wizard/routes -//= require_tree ./wizard/templates +//= require_tree ./wizard/templates \ No newline at end of file diff --git a/assets/javascripts/wizard/initializers/custom-wizard.js.es6 b/assets/javascripts/wizard/initializers/custom-wizard.js.es6 index ca396081..8ae67d6b 100644 --- a/assets/javascripts/wizard/initializers/custom-wizard.js.es6 +++ b/assets/javascripts/wizard/initializers/custom-wizard.js.es6 @@ -105,10 +105,11 @@ export default { }); ApplicationRoute.reopen({ - redirect() { - this.transitionTo("custom"); - }, model() {}, + renderTemplate() { + this.render("application"); + this.render("modal", { into: "application", outlet: "modal" }); + } }); $.ajaxPrefilter(function (_, __, jqXHR) { diff --git a/assets/javascripts/wizard/routes/custom-step.js.es6 b/assets/javascripts/wizard/routes/custom-step.js.es6 index 8088727a..b471d096 100644 --- a/assets/javascripts/wizard/routes/custom-step.js.es6 +++ b/assets/javascripts/wizard/routes/custom-step.js.es6 @@ -1,5 +1,6 @@ import WizardI18n from "../lib/wizard-i18n"; import { getCachedWizard } from "../models/custom"; +import showModal from "discourse/lib/show-modal"; export default Ember.Route.extend({ beforeModel() { @@ -43,4 +44,14 @@ export default Ember.Route.extend({ controller.setProperties(props); }, + + renderTemplate() { + this.render("custom.step"); + const modalController = showModal('resume-popup-modal'); + }, + + actions: { + closeModal(initiatedBy) { + } + } }); diff --git a/assets/javascripts/wizard/templates/application.hbs b/assets/javascripts/wizard/templates/application.hbs index c24cd689..cdca5b82 100644 --- a/assets/javascripts/wizard/templates/application.hbs +++ b/assets/javascripts/wizard/templates/application.hbs @@ -1 +1,2 @@ {{outlet}} +{{outlet "modal"}} \ No newline at end of file diff --git a/assets/javascripts/wizard/templates/modal.resume-popup-modal.hbs b/assets/javascripts/wizard/templates/modal.resume-popup-modal.hbs new file mode 100644 index 00000000..52a9ad5c --- /dev/null +++ b/assets/javascripts/wizard/templates/modal.resume-popup-modal.hbs @@ -0,0 +1 @@ +