diff --git a/CHANGELOG.md b/CHANGELOG.md index 4013f476..12be7aab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +- `operationMode` option for `CadenzaClient#show` +- `disabledUiFeatures` option for `CadenzaClient#show` - `webApplication` constructor option - `mediaType` option for `CadenzaClient#show` - `CadenzaClient#fetchData` diff --git a/README.md b/README.md index 09c53e11..568ce405 100644 --- a/README.md +++ b/README.md @@ -65,12 +65,14 @@ const cadenza = window.cadenza.noConflict(); API: [CadenzaClient#show](./classes/CadenzaClient.html#show) -Show an embedding target in an iframe and hide Cadenza's main header and footer as well as the workbook toolbar: +Show an embedding target in an iframe and hide Cadenza's main header and footer as well as the workbook toolbar. Additionally, enable simplified operation mode and disable the designer. ```javascript cadenzaClient.show('{embeddingTargetId}', { hideMainHeaderAndFooter: true, hideWorkbookToolBar: true, + operationMode: 'simplified', + disabledUiFeatures: ['workbook-design'] }); ``` diff --git a/sandbox.html b/sandbox.html index 81de7ddc..5ed24f8f 100644 --- a/sandbox.html +++ b/sandbox.html @@ -70,12 +70,14 @@ const cadenzaClient = cadenza(location.origin + '/trunk', { iframe: 'iframe', debug: true }); const actionHandlers = { - show ({ embeddingTargetId, hideMainHeaderAndFooter, hideWorkbookToolBar, jasperReportAsPdf, highlightGlobalId }) { + show ({ embeddingTargetId, hideMainHeaderAndFooter, hideWorkbookToolBar, jasperReportAsPdf, highlightGlobalId, operationMode, disabledUiFeatures }) { cadenzaClient.show(embeddingTargetId, { hideMainHeaderAndFooter: (hideMainHeaderAndFooter === 'on'), hideWorkbookToolBar: (hideWorkbookToolBar === 'on'), highlightGlobalId, ...(jasperReportAsPdf === 'on' && { mediaType: 'application/pdf' }), + operationMode: operationMode === 'on' ? 'simplified' : 'normal', + disabledUiFeatures: disabledUiFeatures && disabledUiFeatures.split(',') }); }, showMap ({ embeddingTargetId, useMapSrs, geometry, mapExtent, locationFinder, highlightGlobalId }) { @@ -189,10 +191,20 @@ Hide workbook toolbar +
+ +
+
+ + +