├── .gitattributes ├── .gitignore ├── .prettierrc.json ├── README.md ├── babel.config.js ├── package-lock.json ├── package.json ├── public ├── favicon.ico └── index.html ├── src ├── App.vue ├── assets │ └── xrm.js ├── main.js ├── router │ └── index.js └── views │ ├── ModalInfo.vue │ ├── ModalStart.vue │ └── ModalSubmit.vue └── vue.config.js /.gitattributes: -------------------------------------------------------------------------------- 1 | text=lf 2 | *.css linguist-vendored eol=lf 3 | *.scss linguist-vendored eol=lf 4 | *.js linguist-vendored eol=lf 5 | *.php eol=lf 6 | CHANGELOG.md export-ignore -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | 6 | # local env files 7 | .env 8 | .env.local 9 | .env.*.local 10 | 11 | # Log files 12 | npm-debug.log* 13 | yarn-debug.log* 14 | yarn-error.log* 15 | pnpm-debug.log* 16 | 17 | # Editor directories and files 18 | .idea 19 | .vscode 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "trailingComma": "all", 3 | "tabWidth": 2, 4 | "singleQuote": true, 5 | "semi": true 6 | } 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # multi-page-modal 2 | 3 | ## Documentation 4 | Please see the following for information on how to use this module: 5 | 6 | 7 | 8 | ![Demo](https://tldr-dynamics-assets.s3.us-east-2.amazonaws.com/img/posts/multipagemodal_105.gif) 9 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "multi-page-modal", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build", 8 | "lint": "vue-cli-service lint" 9 | }, 10 | "dependencies": { 11 | "axios": "^0.21.1", 12 | "bulma": "^0.9.2", 13 | "core-js": "^3.6.5", 14 | "vue": "^2.6.11", 15 | "vue-router": "^3.4.3" 16 | }, 17 | "devDependencies": { 18 | "@vue/cli-plugin-babel": "~4.5.0", 19 | "@vue/cli-plugin-eslint": "~4.5.0", 20 | "@vue/cli-service": "~4.5.0", 21 | "babel-eslint": "^10.1.0", 22 | "eslint": "^6.7.2", 23 | "eslint-plugin-vue": "^6.2.2", 24 | "vue-template-compiler": "^2.6.11" 25 | }, 26 | "eslintConfig": { 27 | "root": true, 28 | "env": { 29 | "node": true 30 | }, 31 | "extends": [ 32 | "plugin:vue/essential", 33 | "eslint:recommended" 34 | ], 35 | "parserOptions": { 36 | "parser": "babel-eslint" 37 | }, 38 | "rules": {} 39 | }, 40 | "browserslist": [ 41 | "> 1%", 42 | "last 2 versions", 43 | "not dead" 44 | ] 45 | } 46 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcorcor1/multipage-modal-D365-vue/cf12d093efa383c6fab9d3611484e8e774805ace/public/favicon.ico -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | <%= htmlWebpackPlugin.options.title %> 9 | 10 | 11 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 29 | 30 | 53 | 54 | 84 | -------------------------------------------------------------------------------- /src/assets/xrm.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-undef */ 2 | /* eslint-disable no-unused-vars */ 3 | function multiModalForm(executionContext) { 4 | const formContext = executionContext.getFormContext(); 5 | 6 | const dialogParameters = { 7 | pageType: 'webresource', 8 | webresourceName: 'cr847_/tldr/index.html', 9 | }; 10 | 11 | const navigationOptions = { 12 | target: 2, 13 | width: 400, 14 | height: 600, 15 | position: 1, 16 | }; 17 | 18 | Xrm.Navigation.navigateTo(dialogParameters, navigationOptions).then( 19 | function success() { 20 | const formFields = window.sessionStorage.getItem('tldr-form'); 21 | console.log(JSON.parse(formFields)); 22 | formContext.getAttribute('cr847_forminputs').setValue(formFields); 23 | /* 24 | DO YOUR PROCESSING WITH FORM DATA 25 | */ 26 | //clean-up after 27 | window.sessionStorage.setItem('tldr-form', ''); 28 | }, 29 | function error(e) { 30 | console.log(e.message); 31 | }, 32 | ); 33 | } 34 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import App from './App.vue'; 3 | import router from './router'; 4 | import 'bulma/css/bulma.css'; 5 | 6 | Vue.config.productionTip = false; 7 | 8 | new Vue({ 9 | render: h => h(App), 10 | router, 11 | }).$mount('#app'); 12 | -------------------------------------------------------------------------------- /src/router/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import Router from 'vue-router'; 3 | import ModalStart from '../views/ModalStart.vue'; 4 | import ModalInfo from '../views/ModalInfo.vue'; 5 | import ModalSubmit from '../views/ModalSubmit.vue'; 6 | 7 | Vue.use(Router); 8 | 9 | export default new Router({ 10 | mode: 'history', 11 | routes: [ 12 | { 13 | path: '*', // using ModalStart as catchall/fallback as using rel. path of web resource iframe would not match route 14 | name: 'ModalStart', 15 | component: ModalStart, 16 | }, 17 | { 18 | path: '/info', 19 | name: 'ModalInfo', 20 | component: ModalInfo, 21 | }, 22 | { 23 | path: '/submit', 24 | name: 'ModalSubmit', 25 | component: ModalSubmit, 26 | }, 27 | ], 28 | }); 29 | -------------------------------------------------------------------------------- /src/views/ModalInfo.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/views/ModalStart.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/views/ModalSubmit.vue: -------------------------------------------------------------------------------- 1 | 44 | 45 | 128 | 129 | 138 | -------------------------------------------------------------------------------- /vue.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | configureWebpack: { 3 | optimization: { 4 | splitChunks: false, 5 | }, 6 | }, 7 | css: { 8 | extract: false, 9 | }, 10 | }; 11 | --------------------------------------------------------------------------------