From 363eb0a227fa130fd18687dba22dfb5ebb5db626 Mon Sep 17 00:00:00 2001 From: Doris Lam Date: Sun, 12 Nov 2023 22:41:10 -0800 Subject: [PATCH 1/8] add options to config for view link --- config/example.json | 5 +++++ .../presentations/mms-view-link.component.ts | 19 +++++++++++++++++-- src/ve-types/config.d.ts | 5 +++++ 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/config/example.json b/config/example.json index dc5cabe6c..0867dc69c 100644 --- a/config/example.json +++ b/config/example.json @@ -27,6 +27,11 @@ "labels": ["opensource"] }, "loginTimout": 600000, + "viewLink": { + "sectionPrefix": "Section ", + "appendixPrefix": "Appendix ", + "hidePrefixForSections": false + }, "experimental": [ { "id": "experimental-magic", diff --git a/src/ve-components/presentations/mms-view-link.component.ts b/src/ve-components/presentations/mms-view-link.component.ts index 556d29cdf..1baf9c23b 100644 --- a/src/ve-components/presentations/mms-view-link.component.ts +++ b/src/ve-components/presentations/mms-view-link.component.ts @@ -11,6 +11,7 @@ import { veComponents } from '@ve-components'; import { VeComponentOptions } from '@ve-types/angular'; import { ElementObject, ElementsRequest } from '@ve-types/mms'; +import {VeConfig} from "@ve-types/config"; /** * @ngdoc directive @@ -77,6 +78,7 @@ class ViewLinkController implements angular.IComponentController { private docid: string; showNum: boolean; vid: string; + private veConfig: VeConfig; constructor( private $scope: angular.IScope, @@ -88,7 +90,9 @@ class ViewLinkController implements angular.IComponentController { private viewSvc: ViewService, private applicationSvc: ApplicationService, private extensionSvc: ExtensionService - ) {} + ) { + this.veConfig = window.__env; + } $onInit(): void { this.target = this.linkTarget ? this.linkTarget : '_self'; @@ -146,7 +150,7 @@ class ViewLinkController implements angular.IComponentController { (data: ElementObject) => { this.element = data; this.elementName = data.name; - this.type = 'Section '; + this.type = this.veConfig.viewLink.sectionPrefix; this.suffix = ''; this.hash = '#' + data.id; if (this.mmsPeId && this.mmsPeId !== '') { @@ -168,6 +172,8 @@ class ViewLinkController implements angular.IComponentController { } else if (this.viewSvc.isEquation(pe)) { this.type = 'Eq. ('; this.suffix = ')'; + } else if (this.viewSvc.isSection(pe) && this.veConfig.viewLink.hidePrefixForSections) { + this.type = ''; } if (this.applicationSvc.getState().fullDoc) { this.href = `main.project.ref.view.present.document({ projectId: $ctrl.projectId, refId: $ctrl.refId, documentId: $ctrl.docid, viewId: $ctrl.vid })`; @@ -179,6 +185,15 @@ class ViewLinkController implements angular.IComponentController { this.growl.warning(`Unable to retrieve element: ${reason.message}`); } ); + } else { + if (data._veNumber) { + let numbers = data._veNumber.split('.'); + if (numbers.length > 1 && this.veConfig.viewLink.hidePrefixForSections) { + this.type = ''; + } else if (isNaN(parseInt(numbers[0]))) { + this.type = this.veConfig.viewLink.appendixPrefix; + } + } } if (this.apiSvc.isDocument(data)) { docid = data.id; diff --git a/src/ve-types/config.d.ts b/src/ve-types/config.d.ts index d9baacb4a..8ac074e2a 100644 --- a/src/ve-types/config.d.ts +++ b/src/ve-types/config.d.ts @@ -13,6 +13,11 @@ export interface VeConfig { banner?: BrandingStyle; footer?: BrandingStyle; loginTimeout?: number; + viewLink: { + sectionPrefix: string; + appendixPrefix: string; + hidePrefixForSections: boolean; + } experimental?: VeExperimentDescriptor[]; expConfig?: VeExperimentConfig; } From 825195c311c5aaea5e855411d78c5fa1c91c3ef6 Mon Sep 17 00:00:00 2001 From: Doris Lam Date: Tue, 23 Apr 2024 15:15:54 -0700 Subject: [PATCH 2/8] omg fixes for migrated images --- src/ve-core/editor/editor.component.ts | 3 +- src/ve-utils/application/Image.service.ts | 36 +++++++++++++++-------- 2 files changed, 25 insertions(+), 14 deletions(-) diff --git a/src/ve-core/editor/editor.component.ts b/src/ve-core/editor/editor.component.ts index 49e81ed82..bbc11a288 100644 --- a/src/ve-core/editor/editor.component.ts +++ b/src/ve-core/editor/editor.component.ts @@ -430,7 +430,8 @@ export class EditorController implements IComponentController { return ( el.name == 'img' && el.attributes['data-cke-saved-src'] && - el.attributes['data-cke-saved-src'].indexOf(this.veConfig.apiUrl) > -1 + (el.attributes['data-cke-saved-src'].indexOf(this.veConfig.apiUrl) > -1 || + el.attributes['data-cke-saved-src'].indexOf('http') < 0) ); }, true) .forEach((el: CKEDITOR.htmlParser.element) => { diff --git a/src/ve-utils/application/Image.service.ts b/src/ve-utils/application/Image.service.ts index 9d7830738..7e589b3a6 100644 --- a/src/ve-utils/application/Image.service.ts +++ b/src/ve-utils/application/Image.service.ts @@ -14,12 +14,14 @@ export class ImageService { public fixImgSrc(imgDom: JQuery): void { let src = imgDom.attr('src'); if (src) { - if (src) { - if (src.indexOf('http') < 0) { - src = this.veConfig.apiUrl + src; - } - imgDom.attr('src', src + '?token=' + this.authSvc.getToken()); + if (src.indexOf('http') < 0) { + src = this.veConfig.apiUrl + src; + } + let existingToken = src.indexOf('?token='); + if (existingToken > 0) { + src = src.substring(0, existingToken) } + imgDom.attr('src', src + '?token=' + this.authSvc.getToken()); if (imgDom.width() < 860) { //keep image relative centered with text if less than 9 in return; @@ -35,16 +37,24 @@ export class ImageService { } public fixImgUrl = (src: string, addToken?: boolean): string => { - const url = new window.URL(src); - const params = new window.URLSearchParams(url.search); - if (params.has('token')) { - params.delete('token'); + if (src.indexOf('http') < 0) { + src = this.veConfig.apiUrl + src; } - if (addToken) { - params.append('token', this.authSvc.getToken()); + try { + const url = new window.URL(src); + const params = new window.URLSearchParams(url.search); + if (params.has('token')) { + params.delete('token'); + } + if (addToken) { + params.append('token', this.authSvc.getToken()); + } + url.search = params.toString(); + return url.toString(); + } catch(e) { + console.log(e); + return src; } - url.search = params.toString(); - return url.toString(); }; } From 01346ab3377b2e309e08d830ed047969fc5faaaf Mon Sep 17 00:00:00 2001 From: Doris Lam Date: Tue, 23 Apr 2024 16:52:08 -0700 Subject: [PATCH 3/8] restore doc metadata check for numbering depth and separator options --- src/ve-app/pane-left/left-pane.component.ts | 12 ++++++------ src/ve-utils/mms-api-client/View.service.ts | 14 +++++--------- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/src/ve-app/pane-left/left-pane.component.ts b/src/ve-app/pane-left/left-pane.component.ts index 0d7b7f3bd..605231c12 100644 --- a/src/ve-app/pane-left/left-pane.component.ts +++ b/src/ve-app/pane-left/left-pane.component.ts @@ -19,6 +19,7 @@ import { left_default_buttons } from './left-buttons.config'; import { VeComponentOptions, VePromise, VeQService } from '@ve-types/angular'; import { + DocumentObject, ElementObject, ElementsRequest, ElementsResponse, @@ -355,9 +356,8 @@ class LeftPaneController implements angular.IComponentController { projectId: this.treeApi.projectId, }; this.elementSvc.getElement(reqOb).then((root) => { - // TODO this call is taking a long time that keeps the tree from being visible, need - // to see if it can be moved to a resolve or faster - /*if (this.apiSvc.isDocument(root) && this.$state.includes('**.present.**')) { + // TODO this call may take a long time that keeps the tree from being visible? + if (this.apiSvc.isDocument(root) && this.$state.includes('**.present.**')) { this.viewSvc .getDocumentMetadata({ elementId: root.id, @@ -367,7 +367,7 @@ class LeftPaneController implements angular.IComponentController { .then((result) => { this.treeApi.numberingDepth = result.numberingDepth this.treeApi.numberingSeparator = result.numberingSeparator - this.treeApi.startChapter = (root as DocumentObject)._startChapter + this.treeApi.startChapter = Number.isInteger((root as DocumentObject)._startChapter) ? (root as DocumentObject)._startChapter : 1 @@ -375,12 +375,12 @@ class LeftPaneController implements angular.IComponentController { (root as DocumentObject)._childViews = [] resolve(root) }, reject) - } else {*/ + } else { this.treeApi.numberingDepth = 0; this.treeApi.numberingSeparator = '.'; this.treeApi.startChapter = 1; resolve(root); - //} + } }, reject); } else { resolve(null); diff --git a/src/ve-utils/mms-api-client/View.service.ts b/src/ve-utils/mms-api-client/View.service.ts index 931db9dcd..491fd0dd5 100644 --- a/src/ve-utils/mms-api-client/View.service.ts +++ b/src/ve-utils/mms-api-client/View.service.ts @@ -34,7 +34,7 @@ import { PresentationReference, ElementsResponse, GenericResponse, - BasicResponse, + BasicResponse, TaggedValueObject, } from '@ve-types/mms'; import { TreeBranch, View2NodeMap } from '@ve-types/tree'; @@ -1427,7 +1427,7 @@ export class ViewService extends BaseApiService { return res; } values.forEach((value) => { - if (value.type !== 'LiteralString' || !value.value) return; + if (!value.value) return; res.push(value.value as string); }); return res; @@ -1469,18 +1469,14 @@ export class ViewService extends BaseApiService { const elementIds = [ `${reqOb.elementId}_asi-slot-${this.schemaSvc.getValue('DOCUMENT_IDS', 'Header', this.schema)}`, //header `${reqOb.elementId}_asi-slot-${this.schemaSvc.getValue('DOCUMENT_IDS', 'Footer', this.schema)}`, //footer - `${reqOb.elementId}_asi-slot-${this.schemaSvc.getValue( - 'DOCUMENT_IDS', - 'NumDepth', - this.schema - )}`, //numbering depth + `${reqOb.elementId}_asi-slot-${this.schemaSvc.getValue('DOCUMENT_IDS', 'NumDepth', this.schema)}`, //numbering depth `${reqOb.elementId}_asi-slot-${this.schemaSvc.getValue('DOCUMENT_IDS', 'NumSep', this.schema)}`, //numbering separator ]; const metaReqOb: ElementsRequest = Object.assign(reqOb, { elementId: elementIds, }); this.elementSvc - .getElements(metaReqOb, weight) + .getElements(metaReqOb, weight) .then( (data) => { if (data.length === 0) { @@ -1488,7 +1484,7 @@ export class ViewService extends BaseApiService { } for (let i = 0; i < data.length; i++) { const prop = data[i]; - const feature: string = prop.definingFeatureId ? prop.definingFeatureId : null; + const feature: string = prop.tagDefinitionId ? prop.tagDefinitionId : null; const value: LiteralObject[] = prop.value ? prop.value : null; if (!feature || !value || !Array.isArray(value)) { continue; From 23f3f095248aba478155c3f7ef78694e3885b307 Mon Sep 17 00:00:00 2001 From: Doris Lam Date: Tue, 23 Apr 2024 17:13:26 -0700 Subject: [PATCH 4/8] fix token consistently --- src/ve-utils/application/Image.service.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/ve-utils/application/Image.service.ts b/src/ve-utils/application/Image.service.ts index 7e589b3a6..edbe9b2cb 100644 --- a/src/ve-utils/application/Image.service.ts +++ b/src/ve-utils/application/Image.service.ts @@ -17,11 +17,15 @@ export class ImageService { if (src.indexOf('http') < 0) { src = this.veConfig.apiUrl + src; } - let existingToken = src.indexOf('?token='); - if (existingToken > 0) { - src = src.substring(0, existingToken) + const url = new window.URL(src); + const params = new window.URLSearchParams(url.search); + if (params.has('token')) { + params.delete('token'); } - imgDom.attr('src', src + '?token=' + this.authSvc.getToken()); + params.append('token', this.authSvc.getToken()); + url.search = params.toString(); + src = url.toString(); + imgDom.attr('src', src); if (imgDom.width() < 860) { //keep image relative centered with text if less than 9 in return; From 79195f262f5384a1daa66729fb40100d01b02c34 Mon Sep 17 00:00:00 2001 From: Doris Lam Date: Wed, 24 Apr 2024 14:51:38 -0700 Subject: [PATCH 5/8] keep view links within current doc option --- config/example.json | 3 ++- src/ve-components/presentations/mms-view-link.component.ts | 7 +++++++ src/ve-types/config.d.ts | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/config/example.json b/config/example.json index 0867dc69c..42da39f9b 100644 --- a/config/example.json +++ b/config/example.json @@ -30,7 +30,8 @@ "viewLink": { "sectionPrefix": "Section ", "appendixPrefix": "Appendix ", - "hidePrefixForSections": false + "hidePrefixForSections": false, + "alwaysKeepCurrentDoc": false }, "experimental": [ { diff --git a/src/ve-components/presentations/mms-view-link.component.ts b/src/ve-components/presentations/mms-view-link.component.ts index 1baf9c23b..6cadce1fa 100644 --- a/src/ve-components/presentations/mms-view-link.component.ts +++ b/src/ve-components/presentations/mms-view-link.component.ts @@ -12,6 +12,7 @@ import { veComponents } from '@ve-components'; import { VeComponentOptions } from '@ve-types/angular'; import { ElementObject, ElementsRequest } from '@ve-types/mms'; import {VeConfig} from "@ve-types/config"; +import {StateService} from "@uirouter/angularjs"; /** * @ngdoc directive @@ -65,6 +66,7 @@ class ViewLinkController implements angular.IComponentController { '$scope', '$element', '$compile', + '$state', 'growl', 'ElementService', 'ApiService', @@ -84,6 +86,7 @@ class ViewLinkController implements angular.IComponentController { private $scope: angular.IScope, private $element: JQuery, private $compile: angular.ICompileService, + private $state: StateService, private growl: angular.growl.IGrowlService, private elementSvc: ElementService, private apiSvc: ApiService, @@ -208,6 +211,10 @@ class ViewLinkController implements angular.IComponentController { } else { this.$element.html('view link doesn\'t refer to a view'); } + if (this.veConfig.viewLink.alwaysKeepCurrentDoc && this.applicationSvc.getState().currentDoc && + this.$state.includes('**.present.**')) { + this.docid = this.applicationSvc.getState().currentDoc; + } if (this.applicationSvc.getState().fullDoc) { this.href = `main.project.ref.view.present.document({ projectId: $ctrl.projectId, refId: $ctrl.refId, documentId: $ctrl.docid, viewId: $ctrl.vid })`; } else { diff --git a/src/ve-types/config.d.ts b/src/ve-types/config.d.ts index 8ac074e2a..0ced066db 100644 --- a/src/ve-types/config.d.ts +++ b/src/ve-types/config.d.ts @@ -17,6 +17,7 @@ export interface VeConfig { sectionPrefix: string; appendixPrefix: string; hidePrefixForSections: boolean; + alwaysKeepCurrentDoc: boolean; } experimental?: VeExperimentDescriptor[]; expConfig?: VeExperimentConfig; From 33083225880370796bc9b3bae5c2ed35a842257d Mon Sep 17 00:00:00 2001 From: Doris Lam Date: Sat, 4 May 2024 17:09:24 -0700 Subject: [PATCH 6/8] table border styling --- src/lib/ckeditor/contents.css | 9 ++++++++- .../ve-components/components/_mms-misc-components.scss | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/lib/ckeditor/contents.css b/src/lib/ckeditor/contents.css index 0e218e600..b4530cc90 100644 --- a/src/lib/ckeditor/contents.css +++ b/src/lib/ckeditor/contents.css @@ -147,7 +147,14 @@ a > img { background-color: rgba(255, 0, 0, 0.05); margin: 10px; } - +table { + border: 1px solid #ddd; + border-collapse: collapse; +} +table th, table td { + border: 1px solid #ddd; + padding: 5px; +} .image-clean { border: 0; diff --git a/src/styles/ve-components/components/_mms-misc-components.scss b/src/styles/ve-components/components/_mms-misc-components.scss index b2d214d37..6dfb004e8 100644 --- a/src/styles/ve-components/components/_mms-misc-components.scss +++ b/src/styles/ve-components/components/_mms-misc-components.scss @@ -53,7 +53,14 @@ thead td, table caption { font-weight: bold; } - +view table, spec-inspector table { + border-collapse: collapse; + border: 1px solid #ddd; +} +view table td, view table th, spec-inspector table td, spec-inspector table th { + border: 1px solid #ddd; + padding: 5px; +} .table { tr { @include globals.transition(globals.$background-hover-transition); From 4bce1170c9cb6ab1ed57f038717bfcdd7af0ca70 Mon Sep 17 00:00:00 2001 From: Doris Lam Date: Mon, 6 May 2024 09:48:00 -0700 Subject: [PATCH 7/8] save omg settings --- config/.gitignore | 1 + config/omg.json | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 config/omg.json diff --git a/config/.gitignore b/config/.gitignore index 4f4bba48a..1198cb7b3 100644 --- a/config/.gitignore +++ b/config/.gitignore @@ -1,3 +1,4 @@ *.json +!omg.json !example.json !config.js diff --git a/config/omg.json b/config/omg.json new file mode 100644 index 000000000..fd2923daa --- /dev/null +++ b/config/omg.json @@ -0,0 +1,42 @@ +{ + "apiUrl": "https://mms4.openmbee.org", + "printUrl": "https://mms4.openmbee.org/convert", + "basePath": "", + "enableDebug": false, + "customLabels": { + "pi": "PROPRIETARY: Proprietary Information", + "export_ctrl": "EXPORT WARNING: No export controlled documents allowed on this server", + "no_public_release": "Not for Public Release or Redistribution", + "unclassified": "CLASSIFICATION: This system is UNCLASSIFIED" + }, + "loginBanner": { + "labels": [["opensource"]], + "separator": " ", + "background": "#0D47A1", + "color": "#e8e8e8" + }, + "loginWarning": { + "message": [ + "By accessing and using this information system, you acknowledge and consent to the following:\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." + ] + }, + "banner": { + "labels": [] + }, + "footer": { + "labels": ["opensource"] + }, + "loginTimout": 600000, + "viewLink": { + "sectionPrefix": "Clause ", + "appendixPrefix": "Annex ", + "hidePrefixForSections": true, + "alwaysKeepCurrentDoc": true + }, + "experimental": [ + { + "id": "experimental-magic", + "name": "Content Magic" + } + ] +} From 66f9cf59607d04c16894d444d2a93df7be6300a0 Mon Sep 17 00:00:00 2001 From: Doris Lam Date: Mon, 6 May 2024 13:05:18 -0700 Subject: [PATCH 8/8] update doc for pdf css and fix pdf css issues --- docs/advanced.rst | 76 ++++++----------------- src/ve-utils/application/Utils.service.ts | 6 +- 2 files changed, 22 insertions(+), 60 deletions(-) diff --git a/docs/advanced.rst b/docs/advanced.rst index 909ac807f..121879f6c 100644 --- a/docs/advanced.rst +++ b/docs/advanced.rst @@ -9,7 +9,7 @@ Visualizations ---------------------------------------- For TomSawyer diagrams or plots, please see the DocGen Manual. - + Temporal Diff Tag ------------------------------------------- @@ -227,7 +227,7 @@ table[border='0'], table[border='0'] th, table[border='0'] td {border: 0px;} table, th > p, td > p {margin: 0px; padding: 0px;} table, th > div > p, td > div > p {margin: 0px; padding: 0px;} -table mms-transclude-doc p {margin: 0 0 5px;} +table transclude-doc p {margin: 0 0 5px;} th {background-color: #f2f3f2;} /\*------------------------------------------------------------------ 3. Typography @@ -263,16 +263,16 @@ line-through;} /\*------------------------------------------------------------------ 3.2 Errors ------------------------------------------------------------------\*/ -.mms-error {background: repeating-linear-gradient(45deg,#fff,#fff +.ve-error {background: repeating-linear-gradient(45deg,#fff,#fff 10px,#fff2e4 10px,#fff2e4 20px);} /\*------------------------------------------------------------------ 4. Figure Captions ------------------------------------------------------------------\*/ -caption, figcaption, .mms-equation-caption {text-align: center; +caption, figcaption, .caption-type-equation {text-align: center; font-weight: bold;} table, figure {margin-bottom: 10px;} -.mms-equation-caption {float: right;} -mms-view-equation, mms-view-figure, mms-view-image {page-break-inside: +.caption-type-equation {float: right;} +present-equation, present-figure, present-image {page-break-inside: avoid;} /\*------------------------------------------------------------------ 5. Table of Contents @@ -318,15 +318,15 @@ p, div {widows: 2; orphans: 2;} /\*------------------------------------------------------------------ 9. Bookmark Level ------------------------------------------------------------------\*/ -.h1 {bookmark-level: 1;} -.h2 {bookmark-level: 2;} -.h3 {bookmark-level: 3;} -.h4 {bookmark-level: 4;} -.h5 {bookmark-level: 5;} -.h6 {bookmark-level: 6;} -.h7 {bookmark-level: 7;} -.h8 {bookmark-level: 8;} -.h9 {bookmark-level: 9;}` +.bm-level-1 {bookmark-level: 1;} +.bm-level-2 {bookmark-level: 2;} +.bm-level-3 {bookmark-level: 3;} +.bm-level-4 {bookmark-level: 4;} +.bm-level-5 {bookmark-level: 5;} +.bm-level-6 {bookmark-level: 6;} +.bm-level-7 {bookmark-level: 7;} +.bm-level-8 {bookmark-level: 8;} +.bm-level-9 {bookmark-level: 9;}` For page related css, see Paged Media ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -347,8 +347,8 @@ Available Classes | .fir | first view | | st-chapter | | +------------+---------------------------------------------------------+ -| .h1, .h2, | corresponds to view or section titles at that level | -| .h3, etc | (title of view/section 1.2.3 would have class of .h3) | +| .bm-level-1, .bm-level-2, | corresponds to view or section titles at that level | +| .bm-level-3, etc | (title of view/section 1.2.3 would have class of .bm-level-3) | +------------+---------------------------------------------------------+ | .v | the h1 title of a view or section | | iew-title, | | @@ -377,8 +377,8 @@ Change font size of titles based on level: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ :mark:`//smaller sizes for nested titles -.h1 {font-size: 18pt;} .h2 {font-size: 14pt;} .h3 {font-size: 12pt;} -.h4 {font-size: 10pt;} .h5, .h6, .h7, .h8, .h9 {font-size: 9pt;} +.bm-level-1 {font-size: 18pt;} .bm-level-2 {font-size: 14pt;} .bm-level-3 {font-size: 12pt;} +.bm-level-4 {font-size: 10pt;} .bm-level-5, .bm-level-6, .bm-level-7, .bm-level-8, .bm-level-9 {font-size: 9pt;} //start top level sections on odd pages .chapter {page-break-before: right;}` @@ -424,41 +424,3 @@ element's, then 'master' for refId and 'latest' for commitId. The attributes can be added manually via the text editor's html editing tab if desired. - -View Editor User Guide: 10 Run XLR ----------------------------------- - -There's a custom tag one can add to trigger an XLR release from any -view. - -To add the button, go into source mode of a text field and add the -following: - -ignore - -Where the template-id is the string in the url for the xlr design -template, with '/' instead of '-'. - -Ex, if the url in xlr for your template is this: - -https://cae-xlrelease.jpl.nasa.gov/#/templates/Folder898892011-Folder521642095-Folder47c1077774ae4cf69d499daa260b3904-Release619d801931384eae9a25ba8baff2, - -the template-id would be - -Folder898892011/Folder521642095/Folder47c1077774ae4cf69d499daa260b3904/Release619d801931384eae9a25ba8baff2 - -The xlr-task-name attribute is just the name of the button that will -display. - -The xlr-release-name is what the release will be called in xlr. - -Once a user clicks the button, a login popup will appear, this is for -logging into xlrelease using jpl username/pass and permission to create -a release based on the template is controlled by xlr. - -Currently will send the following as variables in the release: - -"contentEditor": jpl username - -"editorEmail": jpl email \ No newline at end of file diff --git a/src/ve-utils/application/Utils.service.ts b/src/ve-utils/application/Utils.service.ts index 14fe6e4d8..1bb0e12d1 100644 --- a/src/ve-utils/application/Utils.service.ts +++ b/src/ve-utils/application/Utils.service.ts @@ -228,7 +228,7 @@ export class UtilsService { capEq.html(equationCap); // If caption does not exist, add to html if (capEq.length === 0) { - el.find('present-equation > transclude > transclude-doc > p') + el.find('present-equation > mms-cf > transclude-doc > p') .last() .append('' + equationCap + ''); } @@ -469,7 +469,7 @@ th {background-color: #f2f3f2;} 3. Typography ------------------------------------------------------------------*/ h1, h2, h3, h4, h5, h6 {font-family: 'Arial', sans-serif; margin: 10px 0; page-break-inside: avoid; page-break-after: avoid;} -.h1 {font-size: 18pt;} .h2 {font-size: 14pt;} .h3 {font-size: 12pt;} .h4 {font-size: 10pt;} .h5, .h6, .h7, .h8, .h9 {font-size: 9pt;} +.bm-level-1 {font-size: 18pt;} .bm-level-2 {font-size: 14pt;} .bm-level-3 {font-size: 12pt;} .bm-level-4 {font-size: 10pt;} .bm-level-5, .bm-level-6, .bm-level-7, .bm-level-8, .bm-level-9 {font-size: 9pt;} .ng-hide {display: none;} .chapter h1.view-title {font-size: 20pt; } body {font-size: 10pt; font-family: 'Times New Roman', Times, serif; } @@ -498,7 +498,7 @@ del, .del{color: black;background: #ffe3e3;text-decoration: line-through;} caption, figcaption, .caption-type-equation {text-align: center; font-weight: bold;} table, figure {margin-bottom: 10px;} .caption-type-equation {float: right;} -mms-view-equation, mms-view-figure, mms-view-image {page-break-inside: avoid;} +present-equation, present-figure, present-image {page-break-inside: avoid;} /*------------------------------------------------------------------ 5. Table of Contents