Skip to content

Commit

Permalink
Portal Restructure (openemr#6530)
Browse files Browse the repository at this point in the history
* Portal Retructure
* initial custom css removal from headers
* Globals support portal themes
* add config portal theme options
* config yaml support
* Header class support

* - size undo from document return to dashboard

* - follow theme for document in core

* - temove unnecessary config
- parse portal to core messaging theme

* - Remove all portal style sheets and remove from gulp build

* - Add a quick start dashboard
- remove document from top level move to dashboard

* - menu hide
  • Loading branch information
sjpadgett committed Jun 11, 2023
1 parent d333f8a commit f803132
Show file tree
Hide file tree
Showing 26 changed files with 392 additions and 2,207 deletions.
21 changes: 3 additions & 18 deletions config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,24 +66,9 @@ assets:
pdf-style:
basePath: '%webroot%/public/themes/'
link: style_pdf.css
patientportal-base:
basePath: '%webroot%/public/themes/'
link: patientportal-base.css
rtl:
basePath: '%webroot%/public/themes/'
link: rtl_patientportal-base.css
patientportal-register:
basePath: '%webroot%/public/themes/'
link: patientportal-register.css
rtl:
basePath: '%webroot%/public/themes/'
link: rtl_patientportal-register.css
patientportal-style:
basePath: '%webroot%/public/themes/'
link: patientportal-style.css
rtl:
basePath: '%webroot%/public/themes/'
link: rtl_patientportal-style.css
portal-theme:
alreadyBuilt: true
link: '%portal_css_header%'
knockout:
basePath: '%assets_static_relative%/knockout/build/output/'
script: knockout-latest.js
Expand Down
55 changes: 1 addition & 54 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ let config = {
// Source file locations
src: {
styles: {
style_portal: 'interface/themes/patientportal-*.scss',
style_tabs: 'interface/themes/tabs_style_*.scss',
style_uni: 'interface/themes/oe-styles/style_*.scss',
style_color: 'interface/themes/colors/*.scss',
Expand Down Expand Up @@ -97,29 +96,6 @@ const autoGeneratedHeader = `
*/
`;

// standard themes css compilation
function styles_style_portal() {
let isSuccess = true;
return gulp.src(config.src.styles.style_portal)
.pipe(injector.replace('// bs4import', '@import "../../public/assets/bootstrap/scss/bootstrap";'))
.pipe(sourcemaps.init())
.pipe(sass().on('error', (err) => {
log_error(isSuccess, err);
}))
.pipe(postcss([prefix()]))
.pipe(gap.prependText(autoGeneratedHeader))
.pipe(gulpif(!config.dev, csso()))
.pipe(gulpif(!config.dev, sourcemaps.write()))
.on('error', (err) => {
log_error(isSuccess, err);
})
.pipe(gulp.dest(config.dest.themes))
.on('end', () => {
if (isSuccess) {
console.log(logprefix + "Finished compiling OpenEMR portal styles");
}
});
}
// standard themes css compilation
function styles_style_uni() {
let isSuccess = true;
Expand Down Expand Up @@ -272,35 +248,6 @@ function styles_style_misc() {
});
}

// rtl standard themes css compilation
function rtl_style_portal() {
let isSuccess = true;
return gulp.src(config.src.styles.style_portal)
.pipe(gap.prependText('$dir: rtl;\n@import "rtl";\n@import "directional";\n')) // watch out for this relative path!
.pipe(gap.appendText('@include if-rtl { @include rtl_style; @include portal_style; }\n'))
.pipe(injector.replace('// bs4import', '@import "oemr-rtl";'))
.pipe(sourcemaps.init())
.pipe(sass().on('error', (err) => {
log_error(isSuccess, err);
}))
.pipe(postcss([prefix()]))
.pipe(gap.prependText(autoGeneratedHeader))
.pipe(gulpif(!config.dev, csso()))
.pipe(gulpif(!config.dev, sourcemaps.write()))
.pipe(rename({
prefix: "rtl_"
}))
.on('error', (err) => {
log_error(isSuccess, err);
})
.pipe(gulp.dest(config.dest.themes))
.on('end', () => {
if (isSuccess) {
console.log(logprefix + "Finished compiling portal styles");
}
});
}

// rtl standard themes css compilation
function rtl_style_uni() {
let isSuccess = true;
Expand Down Expand Up @@ -474,7 +421,7 @@ function rtl_style_misc() {
}

// compile themes
const styles = gulp.parallel(styles_style_color, styles_style_color_compact, styles_style_uni, styles_style_uni_compact, styles_style_portal, styles_style_tabs, styles_style_misc, rtl_style_color, rtl_style_color_compact, rtl_style_uni, rtl_style_uni_compact, rtl_style_portal, rtl_style_tabs, rtl_style_misc);
const styles = gulp.parallel(styles_style_color, styles_style_color_compact, styles_style_uni, styles_style_uni_compact, styles_style_tabs, styles_style_misc, rtl_style_color, rtl_style_color_compact, rtl_style_uni, rtl_style_uni_compact, rtl_style_tabs, rtl_style_misc);

// Copies (and distills, if possible) assets from node_modules to public/assets
function install(done) {
Expand Down
92 changes: 0 additions & 92 deletions interface/themes/patientportal-base.scss

This file was deleted.

105 changes: 0 additions & 105 deletions interface/themes/patientportal-register.scss

This file was deleted.

Loading

0 comments on commit f803132

Please sign in to comment.